Ver código fonte

wxGUI: fix zoom to saved region, broken by https://trac.osgeo.org/grass/changeset/61356

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62541 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 anos atrás
pai
commit
faa57c3856
1 arquivos alterados com 3 adições e 2 exclusões
  1. 3 2
      gui/wxpython/gui_core/dialogs.py

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

@@ -510,8 +510,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)
@@ -538,6 +537,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 '.' "