Sfoglia il codice sorgente

wxGUI/iclass: check topology also for vector maps imported from command line (g.gui.iclass tr=)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54503 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 anni fa
parent
commit
25ba960df5
2 ha cambiato i file con 8 aggiunte e 6 eliminazioni
  1. 6 4
      gui/wxpython/iclass/frame.py
  2. 2 2
      gui/wxpython/iclass/g.gui.iclass.py

+ 6 - 4
gui/wxpython/iclass/frame.py

@@ -476,10 +476,7 @@ class IClassMapFrame(DoubleMapFrame):
         dlg = IClassMapDialog(self, title = _("Import vector map"), element = 'vector')
         if dlg.ShowModal() == wx.ID_OK:
             vName = dlg.GetMap()
-            warning = self._checkImportedTopo(vName)
-            if warning:
-                GMessage(parent = self, message = warning)
-                
+            
             self.ImportAreas(vName)
             
         dlg.Destroy()
@@ -509,6 +506,11 @@ class IClassMapFrame(DoubleMapFrame):
         
         @param vector vector map name
         """
+        warning = self._checkImportedTopo(vector)
+        if warning:
+             GMessage(parent = self, message = warning)
+             return
+        
         wx.BeginBusyCursor()
         wx.Yield()
 

+ 2 - 2
gui/wxpython/iclass/g.gui.iclass.py

@@ -90,6 +90,8 @@ def main():
     # show main frame
     giface = StandaloneGrassInterface()
     frame = IClassMapFrame(parent = None, giface = giface)
+    if not flags['m']:
+        frame.CenterOnScreen()
     if group_name:
         frame.SetGroup(group_name) 
     if map_name:
@@ -99,8 +101,6 @@ def main():
         giface.WriteLog(_("Loading training map <%s>...") % trainingmap_name)
         frame.ImportAreas(trainingmap_name)
 
-    if not flags['m']:
-        frame.CenterOnScreen()
     frame.Show()    
     if flags['m']:
         frame.Maximize()