Fix black palettes

Push the palette widget opening process to the latest
in order to avoid the race condition where the animation
takes of the place of the real palette.

Fixes #2184

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
This commit is contained in:
Martin Abente Lahaye 2014-06-24 13:16:09 -04:00 committed by Gonzalo Odiard
parent 2456465d79
commit 2f19a41432

View File

@ -211,8 +211,6 @@ class Palette(PaletteWindow):
if self._invoker is not None: if self._invoker is not None:
self._update_full_request() self._update_full_request()
PaletteWindow.popup(self, immediate)
if state is None: if state is None:
state = self.PRIMARY state = self.PRIMARY
self.set_palette_state(state) self.set_palette_state(state)
@ -222,6 +220,8 @@ class Palette(PaletteWindow):
else: else:
self._secondary_anim.stop() self._secondary_anim.stop()
PaletteWindow.popup(self, immediate)
def popdown(self, immediate=False): def popdown(self, immediate=False):
if immediate: if immediate:
self._secondary_anim.stop() self._secondary_anim.stop()