[GRASS-SVN] r44300 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Nov 11 10:34:27 EST 2010
Author: martinl
Date: 2010-11-11 07:34:27 -0800 (Thu, 11 Nov 2010)
New Revision: 44300
Modified:
grass/trunk/gui/wxpython/gui_modules/gdialogs.py
grass/trunk/gui/wxpython/gui_modules/gselect.py
Log:
wxGUI: fix linking postgis vectors
Modified: grass/trunk/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gdialogs.py 2010-11-11 12:09:38 UTC (rev 44299)
+++ grass/trunk/gui/wxpython/gui_modules/gdialogs.py 2010-11-11 15:34:27 UTC (rev 44300)
@@ -1042,7 +1042,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
@@ -1282,7 +1282,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/trunk/gui/wxpython/gui_modules/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gselect.py 2010-11-11 12:09:38 UTC (rev 44299)
+++ grass/trunk/gui/wxpython/gui_modules/gselect.py 2010-11-11 15:34:27 UTC (rev 44300)
@@ -1201,7 +1201,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':
@@ -1221,13 +1221,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():
@@ -1319,7 +1319,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