summaryrefslogtreecommitdiff
path: root/libs/canvas/item.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-03-04 10:04:21 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-03-04 21:58:17 -0500
commitdde4d3bbc322f86f638ddc34a47b016f53a55633 (patch)
tree61b2871ab447fec8de27ad6dbdc2470b07cca854 /libs/canvas/item.cc
parent836e95d96437d1b3a0c4e0c3d9761ec5d9618a73 (diff)
only queue an item redraw from Item::show() or Item::Hide() if the call changes the visibility status of the item (i.e. make no-ops really be no-ops)
Diffstat (limited to 'libs/canvas/item.cc')
-rw-r--r--libs/canvas/item.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/libs/canvas/item.cc b/libs/canvas/item.cc
index 8a8acce086..418382da17 100644
--- a/libs/canvas/item.cc
+++ b/libs/canvas/item.cc
@@ -240,15 +240,19 @@ Item::lower_to_bottom ()
void
Item::hide ()
{
- _visible = false;
- _canvas->item_shown_or_hidden (this);
+ if (_visible) {
+ _visible = false;
+ _canvas->item_shown_or_hidden (this);
+ }
}
void
Item::show ()
{
- _visible = true;
- _canvas->item_shown_or_hidden (this);
+ if (!_visible) {
+ _visible = true;
+ _canvas->item_shown_or_hidden (this);
+ }
}
Duple