mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-25 22:57:37 +01:00
Make activate/deactivate all only operate on visible
processors (and also exclude the fader) (#4475). git-svn-id: svn://localhost/ardour2/branches/3.0@10649 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
7496295930
commit
86d927b4dd
4 changed files with 16 additions and 18 deletions
|
|
@ -1666,10 +1666,9 @@ ProcessorBox::for_selected_processors (void (ProcessorBox::*method)(boost::share
|
|||
}
|
||||
|
||||
void
|
||||
ProcessorBox::all_processors_active (bool state)
|
||||
ProcessorBox::all_visible_processors_active (bool state)
|
||||
{
|
||||
_route->all_processors_active (PreFader, state);
|
||||
_route->all_processors_active (PostFader, state);
|
||||
_route->all_visible_processors_active (state);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1946,9 +1945,9 @@ ProcessorBox::register_actions ()
|
|||
|
||||
/* activation etc. */
|
||||
|
||||
ActionManager::register_action (popup_act_grp, X_("activate_all"), _("Activate all"),
|
||||
ActionManager::register_action (popup_act_grp, X_("activate_all"), _("Activate All"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_activate_all));
|
||||
ActionManager::register_action (popup_act_grp, X_("deactivate_all"), _("Deactivate all"),
|
||||
ActionManager::register_action (popup_act_grp, X_("deactivate_all"), _("Deactivate All"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_deactivate_all));
|
||||
ActionManager::register_action (popup_act_grp, X_("ab_plugins"), _("A/B Plugins"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_ab_plugins));
|
||||
|
|
@ -2120,7 +2119,7 @@ ProcessorBox::rb_activate_all ()
|
|||
return;
|
||||
}
|
||||
|
||||
_current_processor_box->all_processors_active (true);
|
||||
_current_processor_box->all_visible_processors_active (true);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -2129,7 +2128,7 @@ ProcessorBox::rb_deactivate_all ()
|
|||
if (_current_processor_box == 0) {
|
||||
return;
|
||||
}
|
||||
_current_processor_box->all_processors_active (false);
|
||||
_current_processor_box->all_visible_processors_active (false);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -301,8 +301,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
|
|||
void processors_reordered (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&, int*);
|
||||
void compute_processor_sort_keys ();
|
||||
|
||||
void all_processors_active(bool state);
|
||||
void all_plugins_active(bool state);
|
||||
void all_visible_processors_active(bool state);
|
||||
void ab_plugins ();
|
||||
|
||||
typedef std::vector<boost::shared_ptr<ARDOUR::Processor> > ProcSelection;
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
|
|||
void disable_plugins ();
|
||||
void ab_plugins (bool forward);
|
||||
void clear_processors (Placement);
|
||||
void all_processors_active (Placement, bool state);
|
||||
void all_visible_processors_active (bool);
|
||||
|
||||
framecnt_t set_private_port_latencies (bool playback) const;
|
||||
void set_public_port_latencies (framecnt_t, bool playback) const;
|
||||
|
|
|
|||
|
|
@ -1625,12 +1625,11 @@ Route::configure_processors_unlocked (ProcessorStreams* err)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/** Set all processors with a given placement to a given active state.
|
||||
* @param p Placement of processors to change.
|
||||
* @param state New active state for those processors.
|
||||
/** Set all visible processors to a given active state (except Fader, whose state is not changed)
|
||||
* @param state New active state for those processors.
|
||||
*/
|
||||
void
|
||||
Route::all_processors_active (Placement p, bool state)
|
||||
Route::all_visible_processors_active (bool state)
|
||||
{
|
||||
Glib::RWLock::ReaderLock lm (_processor_lock);
|
||||
|
||||
|
|
@ -1638,10 +1637,11 @@ Route::all_processors_active (Placement p, bool state)
|
|||
return;
|
||||
}
|
||||
|
||||
ProcessorList::iterator start, end;
|
||||
placement_range(p, start, end);
|
||||
|
||||
for (ProcessorList::iterator i = start; i != end; ++i) {
|
||||
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
|
||||
if (!(*i)->display_to_user() || boost::dynamic_pointer_cast<Amp> (*i)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state) {
|
||||
(*i)->activate ();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue