[GRASS-SVN] r71283 - grass/trunk/gui/wxpython/web_services
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jul 18 10:20:00 PDT 2017
Author: annakrat
Date: 2017-07-18 10:20:00 -0700 (Tue, 18 Jul 2017)
New Revision: 71283
Modified:
grass/trunk/gui/wxpython/web_services/dialogs.py
Log:
wxGUI/WMS: fix Save WMS dialog closing to prevent starting download when dialog is closed with x
Modified: grass/trunk/gui/wxpython/web_services/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/web_services/dialogs.py 2017-07-18 15:02:05 UTC (rev 71282)
+++ grass/trunk/gui/wxpython/web_services/dialogs.py 2017-07-18 17:20:00 UTC (rev 71283)
@@ -897,11 +897,11 @@
# buttons
self.btn_close = Button(parent=self, id=wx.ID_CLOSE)
+ self.SetEscapeId(self.btn_close.GetId())
self.btn_close.SetToolTip(_("Close dialog"))
self.btn_ok = Button(
parent=self,
- id=wx.ID_OK,
label=_("&Save layer"))
self.btn_ok.SetToolTip(_("Save web service layer as raster map"))
@@ -965,7 +965,6 @@
self.Fit()
# bindings
- self.btn_close.Bind(wx.EVT_BUTTON, self.OnClose)
self.btn_ok.Bind(wx.EVT_BUTTON, self.OnSave)
self.Bind(EVT_CMD_DONE, self.OnCmdDone)
@@ -995,13 +994,6 @@
return selSizer
- def OnClose(self, event):
- """Close dialog
- """
- if not self.IsModal():
- self.Destroy()
- event.Skip()
-
def OnRegionType(self, event):
selected = event.GetEventObject()
if selected == self.region_types['named']:
More information about the grass-commit
mailing list