mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-21 12:55:57 +01:00
make raise_to_top() and lower_to_bottom() no-ops if item is already in the right place
This commit is contained in:
parent
7f83975e7d
commit
7b24be86a2
1 changed files with 11 additions and 0 deletions
|
|
@ -233,6 +233,12 @@ Group::clear (bool with_delete)
|
|||
void
|
||||
Group::raise_child_to_top (Item* i)
|
||||
{
|
||||
if (!_items.empty()) {
|
||||
if (_items.front() == i) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_items.remove (i);
|
||||
_items.push_back (i);
|
||||
invalidate_lut ();
|
||||
|
|
@ -259,6 +265,11 @@ Group::raise_child (Item* i, int levels)
|
|||
void
|
||||
Group::lower_child_to_bottom (Item* i)
|
||||
{
|
||||
if (!_items.empty()) {
|
||||
if (_items.back() == i) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
_items.remove (i);
|
||||
_items.push_front (i);
|
||||
invalidate_lut ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue