From 371dd04653752cd8841b21b9c763cf765723dcad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 30 Mar 2019 00:50:18 +0100 Subject: [PATCH] Avoid warning when resizing dialog The default size may use -1 for unset but resize requires positive width and height. --- tryton/gui/window/wizard.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tryton/gui/window/wizard.py b/tryton/gui/window/wizard.py index 08da3bc8c9..b7801dea4f 100644 --- a/tryton/gui/window/wizard.py +++ b/tryton/gui/window/wizard.py @@ -420,7 +420,9 @@ class WizardDialog(Wizard, NoModal): 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):