Skip to content

Commit

Permalink
wxGUI/mapswipe: fix map image flickering if position is changed by sash
Browse files Browse the repository at this point in the history
  • Loading branch information
tmszi committed Jun 15, 2024
1 parent ef6bae8 commit fa51e02
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gui/wxpython/mapswipe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa51e02

Please sign in to comment.