From 631a46a18346918f9a15aa2ca98b19d8c0df2c54 Mon Sep 17 00:00:00 2001 From: u214892 <u214892@sbb.ch> Date: Thu, 4 Jul 2019 12:27:59 +0200 Subject: [PATCH] bugfix Tk mess --- flatland/utils/graphics_pil.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/flatland/utils/graphics_pil.py b/flatland/utils/graphics_pil.py index 22a5c5f2..5f91b8bc 100644 --- a/flatland/utils/graphics_pil.py +++ b/flatland/utils/graphics_pil.py @@ -163,11 +163,9 @@ class PILGL(GraphicsLayer): if self.unattended_switch: # use tk.Toplevel() instead of tk.Tk() since we run all examples from the same python script # https://stackoverflow.com/questions/26097811/image-pyimage2-doesnt-exist - tk.Toplevel() + self.window_root = tk.Toplevel() else: - tk.Tk() - - self.window_root = tk.Toplevel() + self.window_root = tk.Tk() self.window_root.withdraw() self.window = tk.Toplevel(self.window_root) self.window.title("Flatland") -- GitLab