changeset 1c799b2c601c in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset;node=1c799b2c601c
description:
Avoid warning when resizing dialog
The default size may use -1 for unset but resize requires positive
width and
height.
diffstat:
tryton/gui/window/wizard.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (14 lines):
diff -r 3576bc7b7cb5 -r 1c799b2c601c tryton/gui/window/wizard.py
--- a/tryton/gui/window/wizard.py Thu Mar 28 19:35:58 2019 +0100
+++ b/tryton/gui/window/wizard.py Sat Mar 30 00:50:18 2019 +0100
@@ -420,7 +420,9 @@
else:
width, height = -1, -1
self.dia.set_default_size(max(200, width), height)
- self.dia.resize(*self.dia.get_default_size())
+ width, height = self.dia.get_default_size()
+ if width > 0 and height > 0:
+ self.dia.resize(*self.dia.get_default_size())
self.dia.show()
def hide(self):