فهرست منبع

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 سال پیش
والد
کامیت
a57c2dadee
1فایلهای تغییر یافته به همراه0 افزوده شده و 1 حذف شده
  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)