[GRASS-SVN] r57921 - grass/trunk/gui/wxpython/modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Oct 3 04:08:37 PDT 2013
Author: martinl
Date: 2013-10-03 04:08:36 -0700 (Thu, 03 Oct 2013)
New Revision: 57921
Modified:
grass/trunk/gui/wxpython/modules/colorrules.py
Log:
wxGUI/colorrules: use ColorTablesComboBox widget
Modified: grass/trunk/gui/wxpython/modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/modules/colorrules.py 2013-10-03 10:59:10 UTC (rev 57920)
+++ grass/trunk/gui/wxpython/modules/colorrules.py 2013-10-03 11:08:36 UTC (rev 57921)
@@ -43,6 +43,7 @@
from gui_core.forms import GUI
from core.debug import Debug as Debug
from core.settings import UserSettings
+from gui_core.widgets import ColorTablesComboBox
class RulesPanel:
def __init__(self, parent, mapType, attributeType, properties, panelWidth = 180):
@@ -416,9 +417,8 @@
startDirectory = os.getcwd(), fileMode = wx.SAVE,
changeCallback = self.OnSaveRulesFile)
- colorTable = wx.Choice(parent = parent, id = wx.ID_ANY, size = (200, -1),
- choices = utils.GetColorTables(),
- name = "colorTableChoice")
+ colorTable = ColorTablesComboBox(parent = parent, size=globalvar.DIALOG_COMBOBOX_SIZE,
+ choices = utils.GetColorTables(), name="colorTableChoice")
self.btnSet = wx.Button(parent = parent, id = wx.ID_ANY, label = _("&Set"), name = 'btnSet')
self.btnSet.Bind(wx.EVT_BUTTON, self.OnSetTable)
self.btnSet.Enable(False)
@@ -577,7 +577,7 @@
def OnSetTable(self, event):
"""!Load pre-defined color table"""
- ct = self.FindWindowByName("colorTableChoice").GetStringSelection()
+ ct = self.FindWindowByName("colorTableChoice").GetValue()
# save original color table
ctOriginal = RunCommand('r.colors.out', read = True, map = self.inmap, rules = '-')
# set new color table
More information about the grass-commit
mailing list