[GRASS-SVN] r44301 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Nov 11 10:37:08 EST 2010


Author: martinl
Date: 2010-11-11 07:37:08 -0800 (Thu, 11 Nov 2010)
New Revision: 44301

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py
Log:
wxGUI: fix linking postgis vectors


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py	2010-11-11 15:34:27 UTC (rev 44300)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gdialogs.py	2010-11-11 15:37:08 UTC (rev 44301)
@@ -1041,7 +1041,7 @@
         """!Import/Link data (each layes as separate vector map)"""
         pass
     
-    def AddLayers(self, returncode):
+    def AddLayers(self, returncode, cmd = None):
         """!Add imported/linked layers into layer tree"""
         self.commandId += 1
         
@@ -1281,7 +1281,7 @@
             self.SetStringItem(index, 1, "%s" % str(name))
             self.SetStringItem(index, 2, "%s" % str(grassName))
             # check by default
-            self.CheckItem(index, True)
+            ### self.CheckItem(index, True)
         
         self.SetColumnWidth(col=0, width=wx.LIST_AUTOSIZE_USEHEADER)
 

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py	2010-11-11 15:34:27 UTC (rev 44300)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gselect.py	2010-11-11 15:37:08 UTC (rev 44301)
@@ -1160,7 +1160,7 @@
         
         layerId = 1
         if self.format.GetStringSelection() == 'PostgreSQL':
-            dsn = 'PG:dbname=%s' % self.input[self.dsnType][1].GetStringSelection()
+            dsn = 'PG:dbname=%s' % self.input[self.dsnType][1].GetValue()
         else:
             dsn = self.input[self.dsnType][1].GetValue()
         if self.dsnType == 'file':
@@ -1180,13 +1180,13 @@
         elif self.dsnType == 'db':
             ret = gcmd.RunCommand('v.in.ogr',
                                   quiet = True,
-                                  parent = self,
                                   read = True,
                                   flags = 'l',
                                   dsn = dsn)
             if not ret:
-                self.list.LoadData()
-                self.btn_run.Enable(False)
+                self.parent.list.LoadData()
+                if hasattr(self, "btn_run"):
+                    self.btn_run.Enable(False)
                 return
             layerId = 1
             for line in ret.splitlines():
@@ -1278,7 +1278,7 @@
     def GetDsn(self):
         """!Get DSN"""
         if self.format.GetStringSelection() == 'PostgreSQL':
-            return 'PG:dbname=%s' % self.input[self.dsnType][1].GetStringSelection()
+            return 'PG:dbname=%s' % self.input[self.dsnType][1].GetValue()
         
         return self.input[self.dsnType][1].GetValue()
 



More information about the grass-commit mailing list