mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
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
1 changed files with 15 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue