mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Do not allow to DnD plugins to the same route's other processor box
e.g. detached mixer to editor-mixer processor box
This commit is contained in:
parent
938e1dc7e2
commit
82cb9ae37b
2 changed files with 9 additions and 0 deletions
|
|
@ -1984,6 +1984,7 @@ ProcessorBox::ProcessorBox (ARDOUR::Session* sess, std::function<PluginSelector*
|
|||
processor_display.Reordered.connect (sigc::mem_fun (*this, &ProcessorBox::reordered));
|
||||
processor_display.DropFromAnotherBox.connect (sigc::mem_fun (*this, &ProcessorBox::object_drop));
|
||||
processor_display.DropFromExternal.connect (sigc::mem_fun (*this, &ProcessorBox::plugin_drop));
|
||||
processor_display.DragRefuse.connect (sigc::mem_fun (*this, &ProcessorBox::drag_refuse));
|
||||
|
||||
processor_scroller.show ();
|
||||
processor_display.show ();
|
||||
|
|
@ -2151,6 +2152,13 @@ not match the configuration of this track.");
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
ProcessorBox::drag_refuse (DnDVBox<ProcessorEntry>* source, ProcessorEntry*)
|
||||
{
|
||||
ProcessorBox* other = reinterpret_cast<ProcessorBox*> (source->get_data ("processorbox"));
|
||||
return (other && other->_route == _route);
|
||||
}
|
||||
|
||||
void
|
||||
ProcessorBox::object_drop (DnDVBox<ProcessorEntry>* source, ProcessorEntry* position, Glib::RefPtr<Gdk::DragContext> const & context)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -523,6 +523,7 @@ private:
|
|||
|
||||
void plugin_drop (Gtk::SelectionData const &, ProcessorEntry* position, Glib::RefPtr<Gdk::DragContext> const & context);
|
||||
void object_drop (Gtkmm2ext::DnDVBox<ProcessorEntry> *, ProcessorEntry *, Glib::RefPtr<Gdk::DragContext> const &);
|
||||
bool drag_refuse (Gtkmm2ext::DnDVBox<ProcessorEntry> *, ProcessorEntry *);
|
||||
|
||||
Width _width;
|
||||
bool _redisplay_pending;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue