Allow deletions in the mixer strip to fall through to editor if nothing was selected.
{
//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 )
- current_mixer_strip->delete_processors ();
- else
+ deleted = current_mixer_strip->delete_processors ();
+
+ if (!deleted)
cut_copy (Delete);
}
processor_box.processor_operation (ProcessorBox::ProcessorsSelectAll);
}
-void
+bool
MixerStrip::delete_processors ()
{
- processor_box.processor_operation (ProcessorBox::ProcessorsDelete);
+ return processor_box.processor_operation (ProcessorBox::ProcessorsDelete);
}
void
void cut_processors ();
void paste_processors ();
void select_all_processors ();
- void delete_processors ();
+ bool delete_processors (); //note: returns false if nothing was deleted
void toggle_processors ();
void ab_plugins ();
return;
}
- /* nothing selected ... try to get mixer strip at mouse */
-
+/* removed "implicit" selections of strips and plugins, after discussion on IRC
int x, y;
get_pointer (x, y);
if (ms) {
_route_targets.insert (ms);
}
+*/
+
}
void
return false;
}
-void
+bool
ProcessorBox::processor_operation (ProcessorOperation op)
{
ProcSelection targets;
get_selected_processors (targets);
- if (targets.empty()) {
+ 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()) {
int x, y;
processor_display.get_pointer (x, y);
targets.push_back (pointer.first->processor ());
}
}
+*/
switch (op) {
case ProcessorsSelectAll:
default:
break;
}
+
+ return true;
}
ProcessorWindowProxy*
void set_route (boost::shared_ptr<ARDOUR::Route>);
void set_width (Width);
- void processor_operation (ProcessorOperation);
+ bool processor_operation (ProcessorOperation);
void select_all_processors ();
void deselect_all_processors ();