[GRASS-SVN] r44302 -
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Nov 11 11:18:49 EST 2010
Author: martinl
Date: 2010-11-11 08:18:49 -0800 (Thu, 11 Nov 2010)
New Revision: 44302
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gdialogs.py
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gselect.py
Log:
wxGUI: fix linking postgis vectors
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gdialogs.py 2010-11-11 15:37:08 UTC (rev 44301)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gdialogs.py 2010-11-11 16:18:49 UTC (rev 44302)
@@ -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/releasebranch_6_4/gui/wxpython/gui_modules/gselect.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gselect.py 2010-11-11 15:37:08 UTC (rev 44301)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gselect.py 2010-11-11 16:18:49 UTC (rev 44302)
@@ -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