[GRASS-SVN] r51115 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Mar 19 17:39:40 EDT 2012


Author: martinl
Date: 2012-03-19 14:39:40 -0700 (Mon, 19 Mar 2012)
New Revision: 51115

Modified:
   grass/trunk/gui/wxpython/gui_core/gselect.py
Log:
wxGUI: update GdalOutputDialog (pg support)


Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py	2012-03-19 21:38:57 UTC (rev 51114)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py	2012-03-19 21:39:40 UTC (rev 51115)
@@ -1130,7 +1130,7 @@
                            'pro'    : -1,
                            'native' : -1 }
         idx = 0
-        if ogr and link:
+        if ogr and (link or dest):
             extraLabel = " (OGR)"
         else:
             extraLabel = ""
@@ -1154,7 +1154,7 @@
             sources.append(_("Protocol") + extraLabel)
             self.sourceMap['pro'] = idx
             idx += 1
-        if 'database' not in exclude and ogr and link:
+        if 'database' not in exclude and ogr and (link or dest):
             sources.append(_("PostGIS (PG)"))
             self.sourceMap['db-pg'] = idx
         
@@ -1518,10 +1518,16 @@
             self.creationOpt.Enable(False)
             self.parent.btnOk.Enable(True)
         else:
-            if not self.format.IsEnabled():
+            if not win.IsEnabled():
                 win.Enable(True)
-                self.format.Enable(True)
-                self.creationOpt.Enable(True)
+            if sel == self.sourceMap['db-pg']:
+                if self.format.IsEnabled():
+                    self.format.Enable(False)
+                    self.creationOpt.Enable(False)
+            else:
+                if not self.format.IsEnabled():
+                    self.format.Enable(True)
+                    self.creationOpt.Enable(True)
             self.dsnText.SetLabel(self.input[self.dsnType][0])
             self.format.SetItems(self.input[self.dsnType][2])
             if self.parent.GetName() == 'MultiImportDialog':



More information about the grass-commit mailing list