Skip to content

Commit

Permalink
Removing map layer crashes wxGUI (trac.osgeo.org/grass/ticket/3607) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
petrasovaa committed Mar 27, 2020
1 parent 3dbe012 commit c934bb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gui/wxpython/lmgr/layertree.py
Expand Up @@ -421,7 +421,9 @@ def OnLayerContextMenuButton(self, event):
# select the layer in the same way as right click
if not self.IsSelected(layer):
self.DoSelectItem(layer, True, False)
self.OnLayerContextMenu(event)
# CallAfter to allow context button events to finish
# before destroying it when layer is deleted (mac specific)
wx.CallAfter(self.OnLayerContextMenu, event)

def OnLayerContextMenu(self, event):
"""Contextual menu for item/layer"""
Expand Down

0 comments on commit c934bb6

Please sign in to comment.