Skip to content

Commit

Permalink
wxGUI/g.gui.psmap: fix double click on the map frame with vector map (#…
Browse files Browse the repository at this point in the history
…1055)

MapFramePanel class OnMap() event method is called twice if you click
on the added map frame rectangle. Once directly from construct method
and second time as registred select map widget event handler. When
events are triggered, one OnMap() method call get rasterTypeRadio widget
incorrect value (raster type) and than is called g.region command with
wrong raster map parameter (map type is vector).

res = grass.read_command("g.region", flags='gu', raster=map)
  • Loading branch information
tmszi authored and neteler committed Nov 22, 2020
1 parent c010de5 commit a57c2da
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion gui/wxpython/psmap/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,6 @@ def _layout(self):

# bindings
self.scaleChoice.Bind(wx.EVT_CHOICE, self.OnScaleChoice)
self.select.GetTextCtrl().Bind(wx.EVT_TEXT, self.OnMap)
self.Bind(wx.EVT_RADIOBUTTON, self.OnElementType, self.vectorTypeRadio)
self.Bind(wx.EVT_RADIOBUTTON, self.OnElementType, self.rasterTypeRadio)
self.Bind(wx.EVT_CHECKBOX, self.OnBorder, self.borderCheck)
Expand Down

0 comments on commit a57c2da

Please sign in to comment.