Unverified Kaydet (Commit) dd74369c authored tarafından Tal Einat's avatar Tal Einat Kaydeden (comit) GitHub

bpo-34120: fix text viewer to call grab_release() only when needed (GH-8616)

üst 10ea9409
...@@ -83,7 +83,8 @@ class ViewWindow(Toplevel): ...@@ -83,7 +83,8 @@ class ViewWindow(Toplevel):
command=self.ok, takefocus=False) command=self.ok, takefocus=False)
self.viewframe.pack(side='top', expand=True, fill='both') self.viewframe.pack(side='top', expand=True, fill='both')
if modal: self.is_modal = modal
if self.is_modal:
self.transient(parent) self.transient(parent)
self.grab_set() self.grab_set()
if not _utest: if not _utest:
...@@ -91,7 +92,8 @@ class ViewWindow(Toplevel): ...@@ -91,7 +92,8 @@ class ViewWindow(Toplevel):
def ok(self, event=None): def ok(self, event=None):
"""Dismiss text viewer dialog.""" """Dismiss text viewer dialog."""
self.grab_release() if self.is_modal:
self.grab_release()
self.destroy() self.destroy()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment