[Thuban-commits] r2896 - trunk/thuban/Thuban/UI

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Jul 14 15:21:52 CEST 2011


Author: bricks
Date: 2011-07-14 15:21:52 +0200 (Thu, 14 Jul 2011)
New Revision: 2896

Modified:
   trunk/thuban/Thuban/UI/labeldialog.py
Log:
Return the value of the selected list element as a string.
Since it will be used as a Label it needs to be a string representable
object. When a "non str" object is added to the Layer as a label
the Viewport throws an exception. wxwigets seems to store all values as
strings now.


Modified: trunk/thuban/Thuban/UI/labeldialog.py
===================================================================
--- trunk/thuban/Thuban/UI/labeldialog.py	2011-07-14 13:17:17 UTC (rev 2895)
+++ trunk/thuban/Thuban/UI/labeldialog.py	2011-07-14 13:21:52 UTC (rev 2896)
@@ -19,7 +19,11 @@
         SelectableRecordListCtrl.__init__(self, parent, id)
         self.fill_list(table, shape)
 
+    def GetValue(self):
+        """Return the currently selected value as a string"""
+        return str(SelectableRecordListCtrl.GetValue(self))
 
+
 class LabelDialog(wx.Dialog):
 
     def __init__(self, parent, table, shape_index):



More information about the Thuban-commits mailing list