From f24d9a02cb941d61189daed28fa9ae40248b1853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 31 Oct 2021 10:14:37 +0100 Subject: [PATCH] Reshow wizard dialog with the initial size issue10648 review363051003 --- tryton/gui/window/wizard.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tryton/gui/window/wizard.py b/tryton/gui/window/wizard.py index 9b42c26078..02d2237342 100644 --- a/tryton/gui/window/wizard.py +++ b/tryton/gui/window/wizard.py @@ -412,11 +412,15 @@ class WizardDialog(Wizard, NoModal): width, height = self.default_size() else: width, height = -1, -1 - self.dia.set_default_size(max(200, width), height) - width, height = self.dia.get_default_size() - if width > 0 and height > 0: - self.dia.resize(*self.dia.get_default_size()) + self.dia.set_default_size(width, height) + # reshow with initial size + self.dia.hide() + self.dia.unrealize() self.dia.show() + width, height = self.dia.get_size() + screen = self.dia.get_screen() + self.dia.resize( + min(width, screen.width()), min(height, screen.height())) def hide(self): self.dia.hide()