Only try to pop down the submenus if we still have a _Menu #1338

master
Tomeu Vizoso 15 years ago
parent 0159bc7b52
commit 850a78c59a

@ -943,8 +943,6 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
self.set_palette(Palette(text))
palette = property(get_palette, set_palette)
class CellRendererIcon(gtk.GenericCellRenderer):

@ -209,9 +209,10 @@ class Palette(PaletteWindow):
def _popdown_submenus(self):
# TODO explicit hiding of subitems
# should be removed after fixing #1301
for menu_item in self.menu.get_children():
if menu_item.props.submenu is not None:
menu_item.props.submenu.popdown()
if self.menu is not None:
for menu_item in self.menu.get_children():
if menu_item.props.submenu is not None:
menu_item.props.submenu.popdown()
def on_enter(self, event):
PaletteWindow.on_enter(self, event)

Loading…
Cancel
Save