Explorar el Código

wxGUI: fix zoom to saved region, broken by https://trac.osgeo.org/grass/changeset/61356 (merge from trunk, https://trac.osgeo.org/grass/changeset/62541)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@62542 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová hace 10 años
padre
commit
2c683c324b
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      gui/wxpython/gui_core/dialogs.py

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

@@ -509,8 +509,7 @@ class SavedRegion(wx.Dialog):
         
         box.Add(item=self._selection, proportion=0, flag=wx.ALIGN_CENTRE | wx.ALL, border=5)
         self._selection.SetFocus()
-        if self.loadsave == 'save':
-            self._selection.Bind(wx.EVT_TEXT, self.OnRegion)
+        self._selection.Bind(wx.EVT_TEXT, self.OnRegion)
         
         sizer.Add(item = box, proportion = 0, flag = wx.GROW | wx.ALIGN_CENTER_VERTICAL | wx.ALL,
                   border = 5)
@@ -537,6 +536,8 @@ class SavedRegion(wx.Dialog):
 
     def OnRegion(self, event):
         value = self._selection.GetValue()
+        if '@' in value:
+            value = value.rsplit('@', 1)[0]
         if not grass.legal_name(value):
             GMessage(parent=self,
                      message=_("Name cannot begin with '.' "