//special case: if the user is pointing in the editor/mixer strip, they may be trying to delete a plugin.
//we need this because the editor-mixer strip is in the editor window, so it doesn't get the bindings from the mix window
bool deleted = false;
- MixerStrip *entered = MixerStrip::entered_mixer_strip();
- if ( current_mixer_strip && current_mixer_strip == entered )
+ if ( current_mixer_strip && current_mixer_strip == MixerStrip::entered_mixer_strip() )
deleted = current_mixer_strip->delete_processors ();
if (!deleted)
}
}
void
-MixerActor::delete_processors ()
-{
- set_route_targets_for_operation ();
-
- BOOST_FOREACH(RouteUI* r, _route_targets) {
- MixerStrip* ms = dynamic_cast<MixerStrip*> (r);
- if (ms) {
- ms->delete_processors ();
- }
- }
-}
-void
MixerActor::toggle_processors ()
{
set_route_targets_for_operation ();
void cut_processors ();
void paste_processors ();
void select_all_processors ();
- void delete_processors ();
void toggle_processors ();
void ab_plugins ();
+ //this op is different because it checks _all_ mixer strips, and deletes selected plugins on any of them (ignores track selections)
+ //BUT... note that we have used mixerstrip's "Enter" to enforce the rule that only one strip will have an active selection
+ virtual void delete_processors () = 0;
+
/* these actions need access to a Session, do defer to
a derived class
*/
meter_point_button.signal_button_press_event().connect (sigc::mem_fun (gpm, &GainMeter::meter_press), false);
meter_point_button.signal_button_release_event().connect (sigc::mem_fun (gpm, &GainMeter::meter_release), false);
-
+
hide_button.set_events (hide_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
monitor_input_button->set_diameter (3);
MixerStrip::mixer_strip_enter_event (GdkEventCrossing *ev)
{
_entered_mixer_strip = this;
+
+ //although we are triggering on the "enter", to the user it will appear that it is happenin on the "leave"
+ //because the mixerstrip control is a parent that encompasses the strip
+ ARDOUR_UI::instance()->the_mixer()->deselect_all_strip_processors();
+
return false;
}
//clear keyboard focus in the gain display. this is cheesy but fixes a longstanding bug.
gpm.gain_display.set_sensitive(false);
gpm.gain_display.set_sensitive(true);
+
+ //if we leave this mixer strip we need to clear out any selections
+ //processor_box.processor_display.select_none(); //but this doesn't work, because it gets triggered when (for example) you open the menu or start a drag
}
return false;
}
global_frame.queue_draw ();
+// if (!yn)
+// processor_box.deselect_all_processors();
}
void
processor_box.processor_operation (ProcessorBox::ProcessorsSelectAll);
}
+void
+MixerStrip::deselect_all_processors ()
+{
+ processor_box.processor_operation (ProcessorBox::ProcessorsSelectNone);
+}
+
bool
MixerStrip::delete_processors ()
{
void cut_processors ();
void paste_processors ();
void select_all_processors ();
+ void deselect_all_processors ();
bool delete_processors (); //note: returns false if nothing was deleted
void toggle_processors ();
void ab_plugins ();
redisplay_track_list ();
}
+void
+Mixer_UI::deselect_all_strip_processors ()
+{
+ for (list<MixerStrip *>::iterator i = strips.begin(); i != strips.end(); ++i) {
+ (*i)->deselect_all_processors();
+ }
+}
+
+void
+Mixer_UI::delete_processors ()
+{
+ for (list<MixerStrip *>::iterator i = strips.begin(); i != strips.end(); ++i) {
+ (*i)->delete_processors();
+ }
+}
+
+
void
Mixer_UI::remove_strip (MixerStrip* strip)
{
return;
}
-/* removed "implicit" selections of strips and plugins, after discussion on IRC
- int x, y;
- get_pointer (x, y);
-
- MixerStrip* ms = strip_by_x (x);
-
- if (ms) {
- _route_targets.insert (ms);
- }
-*/
+// removed "implicit" selections of strips, after discussion on IRC
}
MonitorSection* monitor_section() const { return _monitor_section; }
+ void deselect_all_strip_processors();
+ void delete_processors();
+
protected:
void set_route_targets_for_operation ();
get_selected_processors (targets);
- if ((op == ProcessorsDelete) && targets.empty())
- return false; //special case: editor-mixer needs to know that nothing got deleted; the user probably meant to delete something in the editor
-
-/* removed "implicit" selections of strips and plugins, after discussion on IRC
- if (targets.empty()) {
+/* if (targets.empty()) {
int x, y;
processor_display.get_pointer (x, y);
}
*/
+ if ( (op == ProcessorsDelete) && targets.empty() )
+ return false; //nothing to delete. return false so the editor-mixer, because the user was probably intending to delete something in the editor
+
switch (op) {
case ProcessorsSelectAll:
processor_display.select_all ();
break;
+ case ProcessorsSelectNone:
+ processor_display.select_none ();
+ break;
+
case ProcessorsCopy:
copy_processors (targets);
break;
ProcessorsPaste,
ProcessorsDelete,
ProcessorsSelectAll,
+ ProcessorsSelectNone,
ProcessorsToggleActive,
ProcessorsAB,
};
}
redir_hpane.pack1 (*insert_box);
- insert_box->ProcessorSelected.connect (sigc::mem_fun(*this, &RouteParams_UI::redirect_selected));
+ insert_box->ProcessorSelected.connect (sigc::mem_fun(*this, &RouteParams_UI::redirect_selected)); //note: this indicates a double-click activation, not just a "selection"
insert_box->ProcessorUnselected.connect (sigc::mem_fun(*this, &RouteParams_UI::redirect_selected));
redir_hpane.show_all();