Patch #1538878: Don't make tkSimpleDialog dialogs transient if

the parent window is withdrawn. This mirrors what dialog.tcl
does.
Will backport to 2.5.
This commit is contained in:
Martin v. Löwis 2006-11-18 18:00:23 +00:00
parent 8c456f3b57
commit c73a4a4f51
2 changed files with 9 additions and 1 deletions

View file

@ -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)