Bläddra i källkod

wxGUI/g.gui.psmap: fix double click on the map frame with vector map (#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)
Tomas Zigo 4 år sedan
förälder
incheckning
a57c2dadee
1 ändrade filer med 0 tillägg och 1 borttagningar
  1. 0 1
      gui/wxpython/psmap/dialogs.py

+ 0 - 1
gui/wxpython/psmap/dialogs.py

@@ -1161,7 +1161,6 @@ class MapFramePanel(Panel):
 
         # 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)