13
0

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)

This commit is contained in:
Paul Davis 2014-03-04 10:04:21 -05:00
parent 836e95d964
commit dde4d3bbc3

View File

@ -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