(trunk-1681) Followup to 1616 to improve behaviour a bit further on rebalancing
This commit is contained in:
parent
109e26161a
commit
d4bd916c90
|
@ -155,9 +155,11 @@ 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):
|
||||||
while Gtk.events_pending():
|
# Dumb loop still needed, or some terms get squished on a Super rebalance
|
||||||
Gtk.main_iteration_do(False)
|
for i in range(3):
|
||||||
self.do_redistribute(*self.last_balance_args)
|
while Gtk.events_pending():
|
||||||
|
Gtk.main_iteration_do(False)
|
||||||
|
self.do_redistribute(*self.last_balance_args)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def do_redistribute(self, recurse_up=False, recurse_down=False):
|
def do_redistribute(self, recurse_up=False, recurse_down=False):
|
||||||
|
@ -176,9 +178,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()
|
||||||
|
|
Loading…
Reference in New Issue