Browse Source

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

Tomas Zigo 4 years ago
parent
commit
ac68b74b69
1 changed files with 7 additions and 6 deletions
  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.