Browse Source

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 years ago
parent
commit
ba079ebce8
1 changed files with 3 additions and 0 deletions
  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)
             mapLayer = self.GetLayerInfo(layer, key='maplayer')
             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:
                 propwin.Hide()