[GRASS-SVN] r47741 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Aug 18 10:43:48 EDT 2011
Author: martinl
Date: 2011-08-18 07:43:48 -0700 (Thu, 18 Aug 2011)
New Revision: 47741
Modified:
grass/trunk/gui/wxpython/gui_modules/colorrules.py
Log:
wxGUI/colorrules: fix DeleteTemporaryColumn in no map given
enlarge window
Modified: grass/trunk/gui/wxpython/gui_modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/colorrules.py 2011-08-18 12:19:57 UTC (rev 47740)
+++ grass/trunk/gui/wxpython/gui_modules/colorrules.py 2011-08-18 14:43:48 UTC (rev 47741)
@@ -329,7 +329,6 @@
@param nviz True if ColorTable is called from nviz thematic mapping
"""
self.parent = parent # GMFrame
-
wx.Frame.__init__(self, parent, id, title, style = style, **kwargs)
self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
@@ -876,7 +875,7 @@
'size' : {'name': 'GRASSSIZE', 'type1': 'integer', 'type2': ['integer']},
'width': {'name': 'GRASSWIDTH', 'type1': 'integer', 'type2': ['integer']}}
ColorTable.__init__(self, parent = parent,
- title = _('Create new color rules for vector map'), **kwargs)
+ title = _('Create new color rules for vector map'), **kwargs)
# additional bindings for vector color management
self.Bind(wx.EVT_COMBOBOX, self.OnLayerSelection, self.layerSelect)
@@ -892,6 +891,8 @@
self.cr_label.SetLabel(_("Enter vector attribute values:"))
self.SetMinSize(self.GetSize())
self.CentreOnScreen()
+
+ self.SetSize((-1, 735))
self.Show()
def _createMapSelection(self, parent):
@@ -1177,16 +1178,19 @@
self.properties['tmpColumn'] = name + '_' + str(idx)
ret = gcmd.RunCommand('v.db.addcolumn',
+ parent = self,
map = self.inmap,
layer = self.properties['layer'],
column = '%s %s' % (self.properties['tmpColumn'], type))
def DeleteTemporaryColumn(self):
"""!Delete temporary column"""
- ret = gcmd.RunCommand('v.db.dropcolumn',
- map = self.inmap,
- layer = self.properties['layer'],
- column = self.properties['tmpColumn'])
+ if self.inmap:
+ gcmd.RunCommand('v.db.dropcolumn',
+ parent = self,
+ map = self.inmap,
+ layer = self.properties['layer'],
+ column = self.properties['tmpColumn'])
def OnLayerSelection(self, event):
# reset choices in column selection comboboxes if layer changes
More information about the grass-commit
mailing list