mailr16011 - /branches/uf_redesign/gui/wizard_elements.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on May 05, 2012 - 22:18:
Author: bugman
Date: Sat May  5 22:18:46 2012
New Revision: 16011

URL: http://svn.gna.org/viewcvs/relax?rev=16011&view=rev
Log:
The previous commit (r16010) did not work - this fixes it.


Modified:
    branches/uf_redesign/gui/wizard_elements.py

Modified: branches/uf_redesign/gui/wizard_elements.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/wizard_elements.py?rev=16011&r1=16010&r2=16011&view=diff
==============================================================================
--- branches/uf_redesign/gui/wizard_elements.py (original)
+++ branches/uf_redesign/gui/wizard_elements.py Sat May  5 22:18:46 2012
@@ -75,13 +75,13 @@
         @type read_only:        bool
         """
 
+        # Set the default to a TextCtrl.
+        if element_type == 'default':
+            element_type = 'text'
+
         # Store the args.
         self.name = name
         self.element_type = element_type
-
-        # Set the default to a TextCtrl.
-        if element_type == 'default':
-            element_type = 'text'
 
         # Init.
         sub_sizer = wx.BoxSizer(wx.HORIZONTAL)
@@ -103,7 +103,7 @@
         sub_sizer.AddSpacer((divider - x, 0))
 
         # Initialise the text input field.
-        if element_type == 'text':
+        if self.element_type == 'text':
             # Set up the text control.
             self._field = wx.TextCtrl(parent, -1, '')
 
@@ -117,7 +117,7 @@
                 self._field.SetOwnBackgroundColour(colour)
 
         # Initialise the combo box input field.
-        elif element_type == 'combo':
+        elif self.element_type == 'combo':
             # The style.
             style = wx.CB_DROPDOWN
             if read_only:
@@ -131,7 +131,7 @@
 
         # Unknown field.
         else:
-            raise RelaxError("Unknown element type '%s'." % element_type)
+            raise RelaxError("Unknown element type '%s'." % 
self.element_type)
 
         # Set up the input field.
         self._field.SetMinSize((50, parent.height_element))




Related Messages


Powered by MHonArc, Updated Sat May 05 22:40:01 2012