Fixup for previous commit - SL #4224

The palette can be None.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
This commit is contained in:
Manuel Quiñones 2012-11-29 15:10:18 -03:00
parent 1497ebc006
commit e456cf1c9e

View File

@ -727,7 +727,7 @@ class CanvasIcon(EventIcon):
self.unset_state_flags(Gtk.StateFlags.PRELIGHT)
def __button_press_event_cb(self, icon, event):
if not self.palette.is_up():
if self.palette and not self.palette.is_up():
self.set_state_flags(self.get_state_flags() | Gtk.StateFlags.ACTIVE,
clear=True)