Only try to pop down the submenus if we still have a _Menu #1338
This commit is contained in:
parent
0159bc7b52
commit
850a78c59a
@ -943,8 +943,6 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
|
|||||||
|
|
||||||
self.set_palette(Palette(text))
|
self.set_palette(Palette(text))
|
||||||
|
|
||||||
palette = property(get_palette, set_palette)
|
|
||||||
|
|
||||||
|
|
||||||
class CellRendererIcon(gtk.GenericCellRenderer):
|
class CellRendererIcon(gtk.GenericCellRenderer):
|
||||||
|
|
||||||
|
@ -209,9 +209,10 @@ class Palette(PaletteWindow):
|
|||||||
def _popdown_submenus(self):
|
def _popdown_submenus(self):
|
||||||
# TODO explicit hiding of subitems
|
# TODO explicit hiding of subitems
|
||||||
# should be removed after fixing #1301
|
# should be removed after fixing #1301
|
||||||
for menu_item in self.menu.get_children():
|
if self.menu is not None:
|
||||||
if menu_item.props.submenu is not None:
|
for menu_item in self.menu.get_children():
|
||||||
menu_item.props.submenu.popdown()
|
if menu_item.props.submenu is not None:
|
||||||
|
menu_item.props.submenu.popdown()
|
||||||
|
|
||||||
def on_enter(self, event):
|
def on_enter(self, event):
|
||||||
PaletteWindow.on_enter(self, event)
|
PaletteWindow.on_enter(self, event)
|
||||||
|
Loading…
Reference in New Issue
Block a user