浏览代码

wxGUI/mapdisp: fix double click on the overlays in the 3D view (#872)

Tomas Zigo 4 年之前
父节点
当前提交
ac68b74b69
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. 7 6
      gui/wxpython/mapdisp/frame.py

+ 7 - 6
gui/wxpython/mapdisp/frame.py

@@ -1216,12 +1216,13 @@ class MapFrame(SingleMapFrame):
 
         :param overlayId: id of overlay
         """
-        dlg = self.decorations[overlayId].dialog
-        if dlg.IsShown():
-            dlg.SetFocus()
-            dlg.Raise()
-        else:
-            dlg.Show()
+        if overlayId in self.decorations:
+            dlg = self.decorations[overlayId].dialog
+            if dlg.IsShown():
+                dlg.SetFocus()
+                dlg.Raise()
+            else:
+                dlg.Show()
 
     def RemoveOverlay(self, overlayId):
         """Hide overlay.