|
@@ -176,6 +176,10 @@ class Settings:
|
|
|
'rasterOpaque' : {
|
|
|
'enabled' : False
|
|
|
},
|
|
|
+ 'rasterColorTable' : {
|
|
|
+ 'enabled' : False,
|
|
|
+ 'selection' : 'rainbow',
|
|
|
+ },
|
|
|
# d.vect
|
|
|
'showType': {
|
|
|
'point' : {
|
|
@@ -1225,6 +1229,29 @@ class PreferencesDialog(wx.Dialog):
|
|
|
|
|
|
gridSizer.Add(item=rasterOpaque,
|
|
|
pos=(row, 0), span=(1, 2))
|
|
|
+
|
|
|
+ # default color table
|
|
|
+ row += 1
|
|
|
+ rasterCTCheck = wx.CheckBox(parent=panel, id=wx.ID_ANY,
|
|
|
+ label=_("Default color table"),
|
|
|
+ name='IsChecked')
|
|
|
+ rasterCTCheck.SetValue(self.settings.Get(group='cmd', key='rasterColorTable', subkey='enabled'))
|
|
|
+ self.winId['cmd:rasterColorTable:enabled'] = rasterCTCheck.GetId()
|
|
|
+ rasterCTCheck.Bind(wx.EVT_CHECKBOX, self.OnCheckColorTable)
|
|
|
+
|
|
|
+ gridSizer.Add(item=rasterCTCheck,
|
|
|
+ pos=(row, 0))
|
|
|
+
|
|
|
+ rasterCTName = wx.Choice(parent=panel, id=wx.ID_ANY, size=(200, -1),
|
|
|
+ choices=utils.GetColorTables(),
|
|
|
+ name="GetStringSelection")
|
|
|
+ rasterCTName.SetStringSelection(self.settings.Get(group='cmd', key='rasterColorTable', subkey='selection'))
|
|
|
+ self.winId['cmd:rasterColorTable:selection'] = rasterCTName.GetId()
|
|
|
+ if not rasterCTCheck.IsChecked():
|
|
|
+ rasterCTName.Enable(False)
|
|
|
+
|
|
|
+ gridSizer.Add(item=rasterCTName,
|
|
|
+ pos=(row, 1))
|
|
|
|
|
|
sizer.Add(item=gridSizer, proportion=1, flag=wx.ALL | wx.EXPAND, border=5)
|
|
|
border.Add(item=sizer, proportion=0, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND, border=3)
|
|
@@ -1634,6 +1661,14 @@ class PreferencesDialog(wx.Dialog):
|
|
|
|
|
|
return panel
|
|
|
|
|
|
+ def OnCheckColorTable(self, event):
|
|
|
+ """!Set/unset default color table"""
|
|
|
+ win = self.FindWindowById(self.winId['cmd:rasterColorTable:selection'])
|
|
|
+ if event.IsChecked():
|
|
|
+ win.Enable()
|
|
|
+ else:
|
|
|
+ win.Enable(False)
|
|
|
+
|
|
|
def OnLoadEpsgCodes(self, event):
|
|
|
"""!Load EPSG codes from the file"""
|
|
|
win = self.FindWindowById(self.winId['projection:statusbar:projFile'])
|