소스 검색

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 년 전
부모
커밋
75990180db
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      gui/wxpython/lmgr/layertree.py

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

@@ -2003,6 +2003,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()