Selaa lähdekoodia

wxGUI/lmgr: prevent the scrollbar from scrolling up when a layer item is checked or unchecked (set focus on the layer item) (#1896)

Authored-by: Anna Petrasova <kratochanna@gmail.com>
Tomas Zigo 3 vuotta sitten
vanhempi
commit
05a4da4c95
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      gui/wxpython/lmgr/layertree.py

+ 3 - 0
gui/wxpython/lmgr/layertree.py

@@ -1757,6 +1757,9 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
         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):