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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jul 19 08:38:14 PDT 2015


Author: martinl
Date: 2015-07-19 08:38:14 -0700 (Sun, 19 Jul 2015)
New Revision: 65631

Modified:
   grass/trunk/gui/wxpython/gui_core/forms.py
   grass/trunk/gui/wxpython/gui_core/widgets.py
Log:
wxGUI: fix GdalSelect usage in forms

Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py	2015-07-19 15:31:07 UTC (rev 65630)
+++ grass/trunk/gui/wxpython/gui_core/forms.py	2015-07-19 15:38:14 UTC (rev 65631)
@@ -1702,7 +1702,7 @@
                                     flag = wx.EXPAND | wx.ALL, border = 3)
                     porf = self.task.get_param('input', element = 'name', raiseError = False)
                     winDataSource = self.FindWindowById(porf['wxId'][0])
-                    winDataSource.reloadDataRequired.connect(lambda data: self.win1.LoadData(data))
+                    winDataSource.reloadDataRequired.connect(lambda data: self.win1.LoadData(data, False))
                     p['wxId'] = [self.win1.GetId()]
                     def OnCheckItem(index, flag):
                         layers = list()

Modified: grass/trunk/gui/wxpython/gui_core/widgets.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/widgets.py	2015-07-19 15:31:07 UTC (rev 65630)
+++ grass/trunk/gui/wxpython/gui_core/widgets.py	2015-07-19 15:38:14 UTC (rev 65631)
@@ -1473,7 +1473,7 @@
         for i in range(len(width)):
             self.SetColumnWidth(col = i, width = width[i])
         
-    def LoadData(self, data = None):
+    def LoadData(self, data = None, selectOne = True):
         """Load data into list"""
         self.DeleteAllItems()
         if data is None:
@@ -1485,7 +1485,7 @@
                 self.SetStringItem(index, i, item[i])
         
         # check by default only on one item
-        if len(data) == 1:
+        if len(data) == 1 and selectOne:
             self.CheckItem(index, True)
         
     def OnLeftDown(self, event):



More information about the grass-commit mailing list