From fa51e022916ba33efa9646ab9642e3278e2ee7b9 Mon Sep 17 00:00:00 2001 From: Tomas Zigo Date: Sat, 15 Jun 2024 11:34:22 +0200 Subject: [PATCH] wxGUI/mapswipe: fix map image flickering if position is changed by sash --- gui/wxpython/mapswipe/frame.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gui/wxpython/mapswipe/frame.py b/gui/wxpython/mapswipe/frame.py index 908da5fc6a1..62b8ae65562 100644 --- a/gui/wxpython/mapswipe/frame.py +++ b/gui/wxpython/mapswipe/frame.py @@ -925,6 +925,14 @@ def SashChanged(self): def OnSashChanging(self, event): Debug.msg(5, "MapSplitter.OnSashChanging()") + if event: + # Prevent map image flickering if it is used sash not slider + # for changing position + wx.CallAfter(self._onSashChanging, event) + else: + self._onSashChanging(event) + + def _onSashChanging(self, event): if not self._moveSash: event.SetSashPosition(-1) return