From ce9212f018fbd074aba7a37cef4291ebd2e428d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 18 Nov 2006 18:00:34 +0000 Subject: Patch #1538878: Don't make tkSimpleDialog dialogs transient if the parent window is withdrawn. This mirrors what dialog.tcl does. --- Lib/lib-tk/tkSimpleDialog.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Lib/lib-tk/tkSimpleDialog.py') diff --git a/Lib/lib-tk/tkSimpleDialog.py b/Lib/lib-tk/tkSimpleDialog.py index 4d11ce0209..02ea034b33 100644 --- a/Lib/lib-tk/tkSimpleDialog.py +++ b/Lib/lib-tk/tkSimpleDialog.py @@ -46,8 +46,13 @@ class Dialog(Toplevel): title -- the dialog title ''' Toplevel.__init__(self, parent) - self.transient(parent) + # If the master is not viewable, don't + # make the child transient, or else it + # would be opened withdrawn + if parent.winfo_viewable(): + self.transient(parent) + if title: self.title(title) -- cgit v1.2.1