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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Dec 19 13:33:28 EST 2009


Author: martinl
Date: 2009-12-19 13:33:28 -0500 (Sat, 19 Dec 2009)
New Revision: 40067

Modified:
   grass/trunk/gui/wxpython/gui_modules/mapdisp.py
Log:
wxGUI: use combobox for map scale


Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2009-12-19 18:10:33 UTC (rev 40066)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2009-12-19 18:33:28 UTC (rev 40067)
@@ -194,11 +194,19 @@
                                                                  "Default value for new map displays can "
                                                                  "be set up in 'User GUI settings' dialog.")))
         # map scale
-        self.statusbarWin['mapscale'] = wx.TextCtrl(parent=self.statusbar, id=wx.ID_ANY,
-                                                    value="", style=wx.TE_PROCESS_ENTER,
+        self.statusbarWin['mapscale'] = wx.ComboBox(parent = self.statusbar, id = wx.ID_ANY,
+                                                    style = wx.TE_PROCESS_ENTER,
                                                     size=(150, -1))
+        self.statusbarWin['mapscale'].SetItems(['1:1000',
+                                                '1:5000',
+                                                '1:10000',
+                                                '1:25000',
+                                                '1:50000',
+                                                '1:100000',
+                                                '1:1000000'])
         self.statusbarWin['mapscale'].Hide()
         self.statusbar.Bind(wx.EVT_TEXT_ENTER, self.OnChangeMapScale, self.statusbarWin['mapscale'])
+        self.statusbar.Bind(wx.EVT_COMBOBOX, self.OnChangeMapScale, self.statusbarWin['mapscale'])
 
         # go to
         self.statusbarWin['goto'] = wx.TextCtrl(parent=self.statusbar, id=wx.ID_ANY,



More information about the grass-commit mailing list