diff options
author | Carl Hetherington <carl@carlh.net> | 2012-01-29 22:51:36 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-01-29 22:51:36 +0000 |
commit | b3b28e82b51153c61b51fe632639f333c8c6b1e0 (patch) | |
tree | 3d680b966377911fb515c70d9190881aca711cf1 /gtk2_ardour/processor_box.cc | |
parent | b468a7b5b3cee8f9af8716a77ffa313f5f2e7f5a (diff) |
Slightly hacky-fix for misbehaviour when drag-and-dropping processors onto the blank entry (#4668).
git-svn-id: svn://localhost/ardour2/branches/3.0@11385 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/processor_box.cc')
-rw-r--r-- | gtk2_ardour/processor_box.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index d6697f9de7..9ee94c1793 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -769,6 +769,21 @@ ProcessorBox::object_drop(DnDVBox<ProcessorEntry>* source, ProcessorEntry* posit boost::shared_ptr<Processor> p; if (position) { p = position->processor (); + if (!p) { + /* dropped on the blank entry (which will be before the + fader), so use the first non-blank child as our + `dropped on' processor */ + list<ProcessorEntry*> c = processor_display.children (); + list<ProcessorEntry*>::iterator i = c.begin (); + while (dynamic_cast<BlankProcessorEntry*> (*i)) { + assert (i != c.end ()); + ++i; + } + + assert (i != c.end ()); + p = (*i)->processor (); + assert (p); + } } list<ProcessorEntry*> children = source->selection (); |