[GRASS-SVN] r72626 - in grass/trunk/gui/wxpython: core dbmgr gui_core iclass

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 17 08:00:24 PDT 2018


Author: annakrat
Date: 2018-04-17 08:00:24 -0700 (Tue, 17 Apr 2018)
New Revision: 72626

Modified:
   grass/trunk/gui/wxpython/core/gthread.py
   grass/trunk/gui/wxpython/dbmgr/base.py
   grass/trunk/gui/wxpython/gui_core/gselect.py
   grass/trunk/gui/wxpython/gui_core/widgets.py
   grass/trunk/gui/wxpython/iclass/digit.py
   grass/trunk/gui/wxpython/iclass/frame.py
Log:
wxGUI: fix d.vect dialog when loading layer without db connection, caused by r72547

Modified: grass/trunk/gui/wxpython/core/gthread.py
===================================================================
--- grass/trunk/gui/wxpython/core/gthread.py	2018-04-17 14:30:38 UTC (rev 72625)
+++ grass/trunk/gui/wxpython/core/gthread.py	2018-04-17 15:00:24 UTC (rev 72626)
@@ -22,6 +22,7 @@
 import Queue
 
 from core.gconsole import EVT_CMD_DONE, wxCmdDone
+from core.gcmd import DecodeString
 
 
 class gThread(threading.Thread, wx.EvtHandler):

Modified: grass/trunk/gui/wxpython/dbmgr/base.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/base.py	2018-04-17 14:30:38 UTC (rev 72625)
+++ grass/trunk/gui/wxpython/dbmgr/base.py	2018-04-17 15:00:24 UTC (rev 72626)
@@ -251,6 +251,7 @@
         for column in columns:
             if globalvar.wxPythonPhoenix:
                 info.Text = column
+                info.SetAlign(wx.LIST_FORMAT_LEFT)
                 self.InsertColumn(i, info)
             else:
                 info.m_text = column

Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py	2018-04-17 14:30:38 UTC (rev 72625)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py	2018-04-17 15:00:24 UTC (rev 72626)
@@ -1139,7 +1139,7 @@
                             self.columns.remove(key)
                         except ValueError:
                             pass
-        except (KeyError, ValueError):
+        except (KeyError, ValueError, GException):
             self.columns[:] = []
 
         # update list

Modified: grass/trunk/gui/wxpython/gui_core/widgets.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/widgets.py	2018-04-17 14:30:38 UTC (rev 72625)
+++ grass/trunk/gui/wxpython/gui_core/widgets.py	2018-04-17 15:00:24 UTC (rev 72626)
@@ -1087,7 +1087,7 @@
         self._search.Bind(wx.EVT_TEXT_ENTER, self.OnEnter)
 
         if self._showTip:
-            self._searchTip = StaticWrapText(parent=self, id=wx.ID_ANY,
+            self._searchTip = wx.StaticText(parent=self, id=wx.ID_ANY,
                                   label="Choose a module", size=(-1, 35))
 
         if self._showChoice:
@@ -1160,6 +1160,7 @@
         label = _("%d modules match") % len(commands)
         if self._showTip:
             self._searchTip.SetLabel(label)
+            self._searchTip.Wrap(self.GetSize()[0])
 
         self.showNotification.emit(message=label)
 
@@ -1193,6 +1194,7 @@
             for module in self._results:
                 if cmd == module.data['command']:
                     self._searchTip.SetLabel(module.data['description'])
+                    self._searchTip.Wrap(self.GetSize()[0])
                     break
 
     def Reset(self):

Modified: grass/trunk/gui/wxpython/iclass/digit.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/digit.py	2018-04-17 14:30:38 UTC (rev 72625)
+++ grass/trunk/gui/wxpython/iclass/digit.py	2018-04-17 15:00:24 UTC (rev 72626)
@@ -167,7 +167,9 @@
         G_set_verbose(verbose)
 
         ret = Vect_get_num_lines(poMapInfoNew)
+        print os.listdir('/home/anna/grassdata/nc_spm_08_grass7/user1/.tmp/anna-laptop/vector')
         Vect_close(poMapInfoNew)
+        print os.listdir('/home/anna/grassdata/nc_spm_08_grass7/user1/.tmp/anna-laptop/vector')
 
         return ret
 

Modified: grass/trunk/gui/wxpython/iclass/frame.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/frame.py	2018-04-17 14:30:38 UTC (rev 72625)
+++ grass/trunk/gui/wxpython/iclass/frame.py	2018-04-17 15:00:24 UTC (rev 72626)
@@ -624,7 +624,8 @@
             return
 
         # copy features to the temporary map
-        vname = self._getTempVectorName()
+        #vname = self._getTempVectorName()
+        vname = self.trainingAreaVector
         # avoid deleting temporary map
         os.environ['GRASS_VECTOR_TEMPORARY'] = '1'
         if digitClass.CopyMap(vname, tmp=True) == -1:



More information about the grass-commit mailing list