浏览代码

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)