mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Remove "implicit" selection for plugin deletion.
Allow deletions in the mixer strip to fall through to editor if nothing was selected.
This commit is contained in:
parent
3876b48879
commit
6bdc976462
6 changed files with 20 additions and 10 deletions
|
|
@ -3734,10 +3734,12 @@ Editor::delete_ ()
|
||||||
{
|
{
|
||||||
//special case: if the user is pointing in the editor/mixer strip, they may be trying to delete a plugin.
|
//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
|
//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();
|
MixerStrip *entered = MixerStrip::entered_mixer_strip();
|
||||||
if ( current_mixer_strip && current_mixer_strip == entered )
|
if ( current_mixer_strip && current_mixer_strip == entered )
|
||||||
current_mixer_strip->delete_processors ();
|
deleted = current_mixer_strip->delete_processors ();
|
||||||
else
|
|
||||||
|
if (!deleted)
|
||||||
cut_copy (Delete);
|
cut_copy (Delete);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2219,10 +2219,10 @@ MixerStrip::select_all_processors ()
|
||||||
processor_box.processor_operation (ProcessorBox::ProcessorsSelectAll);
|
processor_box.processor_operation (ProcessorBox::ProcessorsSelectAll);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
bool
|
||||||
MixerStrip::delete_processors ()
|
MixerStrip::delete_processors ()
|
||||||
{
|
{
|
||||||
processor_box.processor_operation (ProcessorBox::ProcessorsDelete);
|
return processor_box.processor_operation (ProcessorBox::ProcessorsDelete);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
||||||
void cut_processors ();
|
void cut_processors ();
|
||||||
void paste_processors ();
|
void paste_processors ();
|
||||||
void select_all_processors ();
|
void select_all_processors ();
|
||||||
void delete_processors ();
|
bool delete_processors (); //note: returns false if nothing was deleted
|
||||||
void toggle_processors ();
|
void toggle_processors ();
|
||||||
void ab_plugins ();
|
void ab_plugins ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1912,8 +1912,7 @@ Mixer_UI::set_route_targets_for_operation ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* nothing selected ... try to get mixer strip at mouse */
|
/* removed "implicit" selections of strips and plugins, after discussion on IRC
|
||||||
|
|
||||||
int x, y;
|
int x, y;
|
||||||
get_pointer (x, y);
|
get_pointer (x, y);
|
||||||
|
|
||||||
|
|
@ -1922,6 +1921,8 @@ Mixer_UI::set_route_targets_for_operation ()
|
||||||
if (ms) {
|
if (ms) {
|
||||||
_route_targets.insert (ms);
|
_route_targets.insert (ms);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -1195,14 +1195,18 @@ ProcessorBox::leave_notify (GdkEventCrossing*)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
bool
|
||||||
ProcessorBox::processor_operation (ProcessorOperation op)
|
ProcessorBox::processor_operation (ProcessorOperation op)
|
||||||
{
|
{
|
||||||
ProcSelection targets;
|
ProcSelection targets;
|
||||||
|
|
||||||
get_selected_processors (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;
|
int x, y;
|
||||||
processor_display.get_pointer (x, y);
|
processor_display.get_pointer (x, y);
|
||||||
|
|
@ -1213,6 +1217,7 @@ ProcessorBox::processor_operation (ProcessorOperation op)
|
||||||
targets.push_back (pointer.first->processor ());
|
targets.push_back (pointer.first->processor ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case ProcessorsSelectAll:
|
case ProcessorsSelectAll:
|
||||||
|
|
@ -1256,6 +1261,8 @@ ProcessorBox::processor_operation (ProcessorOperation op)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProcessorWindowProxy*
|
ProcessorWindowProxy*
|
||||||
|
|
|
||||||
|
|
@ -280,7 +280,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
|
||||||
void set_route (boost::shared_ptr<ARDOUR::Route>);
|
void set_route (boost::shared_ptr<ARDOUR::Route>);
|
||||||
void set_width (Width);
|
void set_width (Width);
|
||||||
|
|
||||||
void processor_operation (ProcessorOperation);
|
bool processor_operation (ProcessorOperation);
|
||||||
|
|
||||||
void select_all_processors ();
|
void select_all_processors ();
|
||||||
void deselect_all_processors ();
|
void deselect_all_processors ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue