Followup to 1679 to improve behaviour a bit further on rebalancing

This commit is contained in:
Stephen Boddy 2015-11-07 01:14:10 +01:00
parent 56bbfe3b45
commit b87c5fb729
1 changed files with 6 additions and 7 deletions

View File

@ -156,6 +156,8 @@ class Paned(Container):
"""Handle button presses on a Pane""" """Handle button presses on a Pane"""
if event.button == 1: if event.button == 1:
if self.last_balance_time > (time.time() - 1): if self.last_balance_time > (time.time() - 1):
# Dumb loop still needed, or some terms get squished on a Super rebalance
for i in range(3):
while gtk.events_pending(): while gtk.events_pending():
gtk.main_iteration_do(False) gtk.main_iteration_do(False)
self.do_redistribute(*self.last_balance_args) self.do_redistribute(*self.last_balance_args)
@ -177,9 +179,6 @@ class Paned(Container):
grandfather.do_redistribute(recurse_up, recurse_down) grandfather.do_redistribute(recurse_up, recurse_down)
gobject.idle_add(highest_ancestor._do_redistribute, recurse_up, recurse_down) gobject.idle_add(highest_ancestor._do_redistribute, recurse_up, recurse_down)
while gtk.events_pending():
gtk.main_iteration_do(False)
gobject.idle_add(highest_ancestor._do_redistribute, recurse_up, recurse_down)
def _do_redistribute(self, recurse_up=False, recurse_down=False): def _do_redistribute(self, recurse_up=False, recurse_down=False):
maker = Factory() maker = Factory()