projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f83975
)
make raise_to_top() and lower_to_bottom() no-ops if item is already in the right...
author
Paul Davis
<paul@linuxaudiosystems.com>
Thu, 2 Jan 2014 21:49:42 +0000
(16:49 -0500)
committer
Paul Davis
<paul@linuxaudiosystems.com>
Thu, 2 Jan 2014 21:49:42 +0000
(16:49 -0500)
libs/canvas/group.cc
patch
|
blob
|
history
diff --git
a/libs/canvas/group.cc
b/libs/canvas/group.cc
index bcea16dd767b5544f139d52a0dffad9e94cb66fc..1341408dacce21ad3530ea9fd9babbc569348f68 100644
(file)
--- a/
libs/canvas/group.cc
+++ b/
libs/canvas/group.cc
@@
-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 ();