git-svn-id: svn://localhost/ardour2/trunk@1694 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
3b885c3126
commit
a588b517e8
|
@ -606,7 +606,7 @@ ARDOUR_UI::shuttle_box_button_release (GdkEventButton* ev)
|
|||
shuttle_grabbed = false;
|
||||
shuttle_box.remove_modal_grab ();
|
||||
if (Config->get_shuttle_behaviour() == Sprung) {
|
||||
if (Config->get_auto_play() || roll_button.get_state()) {
|
||||
if (Config->get_auto_play() || session->transport_rolling()) {
|
||||
shuttle_fract = SHUTTLE_FRACT_SPEED1;
|
||||
session->request_transport_speed (1.0);
|
||||
stop_button.set_visual_state (0);
|
||||
|
|
|
@ -500,15 +500,6 @@ Editor::build_region_boundary_cache ()
|
|||
break;
|
||||
}
|
||||
|
||||
} else if (clicked_trackview) {
|
||||
|
||||
TrackViewList t;
|
||||
t.push_back (clicked_trackview);
|
||||
|
||||
if ((r = find_next_region (pos, point, 1, t, &ontrack)) == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if ((r = find_next_region (pos, point, 1, track_views, &ontrack)) == 0) {
|
||||
|
|
|
@ -957,21 +957,31 @@ could not match the configuration of this track.");
|
|||
void
|
||||
RedirectBox::all_redirects_active (bool state)
|
||||
{
|
||||
_route->all_redirects_active (state);
|
||||
_route->all_redirects_active (_placement, state);
|
||||
}
|
||||
|
||||
void
|
||||
RedirectBox::clear_redirects()
|
||||
RedirectBox::clear_redirects ()
|
||||
{
|
||||
string prompt;
|
||||
vector<string> choices;
|
||||
|
||||
if (boost::dynamic_pointer_cast<AudioTrack>(_route) != 0) {
|
||||
prompt = _("Do you really want to remove all redirects from this track?\n"
|
||||
"(this cannot be undone)");
|
||||
if (_placement == PreFader) {
|
||||
prompt = _("Do you really want to remove all pre-fader redirects from this track?\n"
|
||||
"(this cannot be undone)");
|
||||
} else {
|
||||
prompt = _("Do you really want to remove all post-fader redirects from this track?\n"
|
||||
"(this cannot be undone)");
|
||||
}
|
||||
} else {
|
||||
prompt = _("Do you really want to remove all redirects from this bus?\n"
|
||||
"(this cannot be undone)");
|
||||
if (_placement == PreFader) {
|
||||
prompt = _("Do you really want to remove all pre-fader redirects from this bus?\n"
|
||||
"(this cannot be undone)");
|
||||
} else {
|
||||
prompt = _("Do you really want to remove all post-fader redirects from this bus?\n"
|
||||
"(this cannot be undone)");
|
||||
}
|
||||
}
|
||||
|
||||
choices.push_back (_("Cancel"));
|
||||
|
@ -980,7 +990,7 @@ RedirectBox::clear_redirects()
|
|||
Gtkmm2ext::Choice prompter (prompt, choices);
|
||||
|
||||
if (prompter.run () == 1) {
|
||||
_route->clear_redirects (this);
|
||||
_route->clear_redirects (_placement, this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -169,9 +169,9 @@ class Route : public IO
|
|||
int copy_redirects (const Route&, Placement, uint32_t* err_streams = 0);
|
||||
int sort_redirects (uint32_t* err_streams = 0);
|
||||
|
||||
void clear_redirects (void *src);
|
||||
void clear_redirects (Placement, void *src);
|
||||
void all_redirects_flip();
|
||||
void all_redirects_active (bool state);
|
||||
void all_redirects_active (Placement, bool state);
|
||||
|
||||
virtual nframes_t update_total_latency();
|
||||
nframes_t signal_latency() const { return _own_latency; }
|
||||
|
|
|
@ -112,7 +112,8 @@ Route::init ()
|
|||
|
||||
Route::~Route ()
|
||||
{
|
||||
clear_redirects (this);
|
||||
clear_redirects (PreFader, this);
|
||||
clear_redirects (PostFader, this);
|
||||
|
||||
for (OrderKeys::iterator i = order_keys.begin(); i != order_keys.end(); ++i) {
|
||||
free ((void*)(i->first));
|
||||
|
@ -924,10 +925,13 @@ Route::add_redirects (const RedirectList& others, void *src, uint32_t* err_strea
|
|||
return 0;
|
||||
}
|
||||
|
||||
/** Remove redirects with a given placement.
|
||||
* @param p Placement of redirects to remove.
|
||||
*/
|
||||
void
|
||||
Route::clear_redirects (void *src)
|
||||
Route::clear_redirects (Placement p, void *src)
|
||||
{
|
||||
uint32_t old_rmo = redirect_max_outs;
|
||||
const uint32_t old_rmo = redirect_max_outs;
|
||||
|
||||
if (!_session.engine().connected()) {
|
||||
return;
|
||||
|
@ -935,13 +939,22 @@ Route::clear_redirects (void *src)
|
|||
|
||||
{
|
||||
Glib::RWLock::WriterLock lm (redirect_lock);
|
||||
RedirectList::iterator i;
|
||||
for (i = _redirects.begin(); i != _redirects.end(); ++i) {
|
||||
(*i)->drop_references ();
|
||||
RedirectList new_list;
|
||||
|
||||
for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
|
||||
if ((*i)->placement() == p) {
|
||||
/* it's the placement we want to get rid of */
|
||||
(*i)->drop_references ();
|
||||
} else {
|
||||
/* it's a different placement, so keep it */
|
||||
new_list.push_back (*i);
|
||||
}
|
||||
}
|
||||
_redirects.clear ();
|
||||
|
||||
_redirects = new_list;
|
||||
}
|
||||
|
||||
/* FIXME: can't see how this test can ever fire */
|
||||
if (redirect_max_outs != old_rmo) {
|
||||
reset_panner ();
|
||||
}
|
||||
|
@ -1309,8 +1322,12 @@ Route::all_redirects_flip ()
|
|||
}
|
||||
}
|
||||
|
||||
/** Set all redirects with a given placement to a given active state.
|
||||
* @param p Placement of redirects to change.
|
||||
* @param state New active state for those redirects.
|
||||
*/
|
||||
void
|
||||
Route::all_redirects_active (bool state)
|
||||
Route::all_redirects_active (Placement p, bool state)
|
||||
{
|
||||
Glib::RWLock::ReaderLock lm (redirect_lock);
|
||||
|
||||
|
@ -1319,7 +1336,9 @@ Route::all_redirects_active (bool state)
|
|||
}
|
||||
|
||||
for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
|
||||
(*i)->set_active (state, this);
|
||||
if ((*i)->placement() == p) {
|
||||
(*i)->set_active (state, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user