Преглед изворни кода

wxGUI/import dialog: fix closing dialog with wxpython 2.9

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58069 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová пре 11 година
родитељ
комит
03471859ee
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      gui/wxpython/gui_core/dialogs.py

+ 3 - 1
gui/wxpython/gui_core/dialogs.py

@@ -1564,7 +1564,9 @@ class ImportDialog(wx.Dialog):
         self.btn_run.SetToolTipString(_("Import selected layers"))
         self.btn_run.SetToolTipString(_("Import selected layers"))
         self.btn_run.SetDefault()
         self.btn_run.SetDefault()
         self.btn_run.Bind(wx.EVT_BUTTON, self.OnRun)
         self.btn_run.Bind(wx.EVT_BUTTON, self.OnRun)
-        
+
+        self.Bind(wx.EVT_CLOSE, lambda evt: self.Destroy())
+
     def doLayout(self):
     def doLayout(self):
         """!Do layout"""
         """!Do layout"""
         dialogSizer = wx.BoxSizer(wx.VERTICAL)
         dialogSizer = wx.BoxSizer(wx.VERTICAL)