Переглянути джерело

wxGUI lmgr: Fix position of layer image button overlaid map layer name (#669)

Adjusts the position of the layer context option button based on the length of the label whenever a different layer is chosen. When the layer name is longer, it was sometimes overlaid by the button.
Tomas Zigo 4 роки тому
батько
коміт
ba079ebce8
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      gui/wxpython/lmgr/layertree.py

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

@@ -2004,6 +2004,9 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
             mapName, found = GetLayerNameFromCmd(dcmd)
             mapName, found = GetLayerNameFromCmd(dcmd)
             mapLayer = self.GetLayerInfo(layer, key='maplayer')
             mapLayer = self.GetLayerInfo(layer, key='maplayer')
             self.SetItemText(layer, mapName)
             self.SetItemText(layer, mapName)
+            # calculates all the positions of the visible items
+            # fix length from item to next non-toplevel window position
+            self.CalculatePositions()
 
 
             if not mapText or not found:
             if not mapText or not found:
                 propwin.Hide()
                 propwin.Hide()