Skip to content

Commit

Permalink
wxGUI/lmgr: prevent the scrollbar from scrolling up when a layer item…
Browse files Browse the repository at this point in the history
… is checked or unchecked (set focus on the layer item) (#1896)

Authored-by: Anna Petrasova <kratochanna@gmail.com>
  • Loading branch information
tmszi committed Oct 6, 2021
1 parent a44cfaf commit 05a4da4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gui/wxpython/lmgr/layertree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1757,6 +1757,9 @@ def OnChangingSel(self, event):
If the user is clicking on checkbox, selection change is vetoed.
"""
if self.hitCheckbox:
# Prevent the scrollbar from scrolling up when a layer item
# is checked or unchecked
self.EnsureVisible(event.GetItem())
event.Veto()

def OnChangeSel(self, event):
Expand Down

0 comments on commit 05a4da4

Please sign in to comment.