Hide only submenus #1301
This commit is contained in:
parent
b087809ec5
commit
d57320b985
@ -201,11 +201,18 @@ class Palette(PaletteWindow):
|
|||||||
def popdown(self, immediate=False):
|
def popdown(self, immediate=False):
|
||||||
if immediate:
|
if immediate:
|
||||||
self._secondary_anim.stop()
|
self._secondary_anim.stop()
|
||||||
self.menu.popdown()
|
self._popdown_submenus()
|
||||||
# to suppress glitches while later re-opening
|
# to suppress glitches while later re-opening
|
||||||
self.set_palette_state(self.PRIMARY)
|
self.set_palette_state(self.PRIMARY)
|
||||||
PaletteWindow.popdown(self, immediate)
|
PaletteWindow.popdown(self, immediate)
|
||||||
|
|
||||||
|
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()
|
||||||
|
|
||||||
def on_enter(self, event):
|
def on_enter(self, event):
|
||||||
PaletteWindow.on_enter(self, event)
|
PaletteWindow.on_enter(self, event)
|
||||||
self._secondary_anim.start()
|
self._secondary_anim.start()
|
||||||
|
Loading…
Reference in New Issue
Block a user