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
This commit is contained in:
parent
b468a7b5b3
commit
b3b28e82b5
@ -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 ();
|
||||
|
Loading…
Reference in New Issue
Block a user