Bläddra i källkod

wxGUI: various vdigit-related fixes

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@35297 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 16 år sedan
förälder
incheckning
6a199cca79

+ 8 - 3
gui/wxpython/gui_modules/gcmd.py

@@ -597,14 +597,19 @@ def RunCommand(prog, flags = "", overwrite = False, quiet = False, verbose = Fal
         kwargs['stdout'] = subprocess.PIPE
     
     if stdin:
-        kwargs['stdin'] = stdin
+        kwargs['stdin'] = subprocess.PIPE
     
     ps = grass.start_command(prog, flags, overwrite, quiet, verbose, **kwargs)
     
-    ret = ps.wait()
+    if stdin:
+        ps.stdin.write(stdin)
+        ps.stdin.close()
+        ps.stdin = None
 
+    ret = ps.wait()
+    
     stdout, stderr = ps.communicate()
-
+        
     if ret != 0 and parent:
         e = CmdError(cmd = prog,
                      message = stderr,

+ 3 - 3
gui/wxpython/gui_modules/gdialogs.py

@@ -186,12 +186,12 @@ def CreateNewVector(parent, cmdDef, title=_('Create new vector map'),
             
             gcmd.RunCommand('db.execute',
                             quiet = True,
-                            parent = self,
+                            parent = parent,
                             stdin = sql)
 
             gcmd.RunCommand('v.db.connect',
                             quiet = True,
-                            parent = self,
+                            parent = parent,
                             map = outmap,
                             table = outmap,
                             key = key,
@@ -205,7 +205,7 @@ def CreateNewVector(parent, cmdDef, title=_('Create new vector map'),
             log.WriteLog(_("New vector map <%s> created") % outmap)
 
         return (outmap, dlg.addbox.IsChecked())
-
+    
     return (None, dlg.addbox.IsChecked())
 
 class SavedRegion(wx.Dialog):

+ 9 - 2
gui/wxpython/gui_modules/georect.py

@@ -136,10 +136,16 @@ class GeorectWizard(object):
         if self.wizard.RunWizard(self.startpage):
             success = self.OnWizFinished()
             if success == False:
-                wx.MessageBox(_("Georectifying setup canceled."))
+                wx.MessageBox(parent=self.parent,
+                              message=_("Georectifying setup canceled."),
+                              caption=_("Georectify"),
+                              style=wx.OK | wx.ICON_INFORMATION | wx.CENTRE)
                 self.Cleanup()
         else:
-            wx.MessageBox(_("Georectifying setup canceled."))
+            wx.MessageBox(parent=self.parent,
+                          message=_("Georectifying setup canceled."),
+                          caption=_("Georectify"),
+                          style=wx.OK | wx.ICON_INFORMATION | wx.CENTRE)
             self.Cleanup()
 
         #
@@ -822,6 +828,7 @@ class GCP(wx.Frame):
             coord = mapWin.Cell2Pixel((gcp[coordtype][0], gcp[coordtype][1]))
             mapWin.DrawCross(pdc=mapWin.pdcTmp, coords=coord,
                              size=5, text={ 'text' : '%s' % str(idx + 1),
+                                            'active' : True,
                                             'font' : font,
                                             'color': wxCol,
                                             'coords': [coord[0] + 5,

+ 0 - 4
gui/wxpython/gui_modules/mapdisp.py

@@ -59,10 +59,6 @@ import globalvar
 import utils
 import gdialogs
 import grass
-from vdigit import VDigitCategoryDialog
-from vdigit import VDigitZBulkDialog
-from vdigit import VDigitDuplicatesDialog
-from vdigit import GV_LINES
 from debug import Debug
 from icon  import Icons
 from preferences import globalSettings as UserSettings

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 556 - 433
gui/wxpython/gui_modules/mapdisp_window.py


+ 1 - 2
gui/wxpython/gui_modules/menuform.py

@@ -832,8 +832,7 @@ class mainFrame(wx.Frame):
         
         if self.get_dcmd and \
                 self.parent and \
-                self.parent.GetName() in ('LayerManager',
-                                          'LayerTree',
+                self.parent.GetName() in ('LayerTree',
                                           'MapWindow'):
             # display decorations and 
             # pressing OK or cancel after setting layer properties