Explorar o código

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 %!s(int64=4) %!d(string=hai) anos
pai
achega
a57c2dadee
Modificáronse 1 ficheiros con 0 adicións e 1 borrados
  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)