[GRASS-SVN] r33870 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 14 08:34:06 EDT 2008


Author: martinl
Date: 2008-10-14 08:34:06 -0400 (Tue, 14 Oct 2008)
New Revision: 33870

Modified:
   grass/trunk/gui/wxpython/gui_modules/colorrules.py
Log:
cmbarton: Fix problem with wx.StaticBox on Mac
(merge from devbr6, r33864)


Modified: grass/trunk/gui/wxpython/gui_modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/colorrules.py	2008-10-14 12:18:41 UTC (rev 33869)
+++ grass/trunk/gui/wxpython/gui_modules/colorrules.py	2008-10-14 12:34:06 UTC (rev 33870)
@@ -105,6 +105,13 @@
         ### self.panel = wx.Panel(parent=self, id=wx.ID_ANY)
 
         # top controls
+        if self.cmd == 'r.colors':
+            maplabel = _('Select raster map:')
+        elif self.cmd == 'vcolors':
+            maplabel = _('Select vector map:')
+        inputBox = wx.StaticBox(parent=self, id=wx.ID_ANY,
+                                label=" %s " % maplabel)
+        self.inputSizer = wx.StaticBoxSizer(inputBox, wx.VERTICAL)
         self.selectionInput = gselect.Select(parent=self, id=wx.ID_ANY,
                                              size=globalvar.DIALOG_GSELECT_SIZE,
                                              type=self.elem)
@@ -196,15 +203,7 @@
         #
         # input
         #
-        if self.cmd == 'r.colors':
-            maplabel = _('Select raster map:')
-        elif self.cmd == 'vcolors':
-            maplabel = _('Select vector map:')
-        
-        inputBox = wx.StaticBox(parent=self, id=wx.ID_ANY,
-                                label=" %s " % maplabel)
-        inputSizer = wx.StaticBoxSizer(inputBox, wx.VERTICAL)
-        inputSizer.Add(item=self.selectionInput,
+        self.inputSizer.Add(item=self.selectionInput,
                        flag=wx.ALIGN_CENTER_VERTICAL | wx.ALL | wx.EXPAND, border=5)
         replaceSizer = wx.BoxSizer(wx.HORIZONTAL)
         replaceSizer.Add(item=self.ovrwrtcheck, proportion=1,
@@ -212,7 +211,7 @@
         replaceSizer.Add(item=self.helpbtn, proportion=0,
                          flag=wx.ALIGN_RIGHT | wx.ALL, border=1)
 
-        inputSizer.Add(item=replaceSizer, proportion=1,
+        self.inputSizer.Add(item=replaceSizer, proportion=1,
                        flag=wx.ALL | wx.EXPAND, border=1)
 
         #
@@ -264,7 +263,7 @@
         btnSizer.Add(self.btnOK,
                      flag=wx.LEFT | wx.RIGHT, border=5)
         
-        sizer.Add(item=inputSizer, proportion=0,
+        sizer.Add(item=self.inputSizer, proportion=0,
                   flag=wx.ALL | wx.EXPAND, border=5)
         
         sizer.Add(item=bodySizer, proportion=1,



More information about the grass-commit mailing list