[GRASS-SVN] r67858 - grass/branches/releasebranch_7_0/gui/wxpython/gmodeler
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Feb 17 01:59:15 PST 2016
Author: martinl
Date: 2016-02-17 01:59:15 -0800 (Wed, 17 Feb 2016)
New Revision: 67858
Modified:
grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py
grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/model.py
Log:
wxGUI: fixes g.gui.gmodeler - Set comment after erasure (#2904)
(merge r67856 from trunk)
Modified: grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py 2016-02-17 09:06:46 UTC (rev 67857)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py 2016-02-17 09:59:15 UTC (rev 67858)
@@ -1374,6 +1374,7 @@
comment = dlg.GetValue()
shape.SetComment(comment)
self.frame.ModelChanged()
+ self.frame.canvas.Refresh()
dlg.Destroy()
def _onSelectShape(self, shape, append=False):
Modified: grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/model.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/model.py 2016-02-17 09:06:46 UTC (rev 67857)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/model.py 2016-02-17 09:59:15 UTC (rev 67858)
@@ -1071,17 +1071,25 @@
def SetComment(self, comment):
"""Set comment"""
+ self.comment = comment
+
if self.regionComment is None:
self.regionComment = ogl.ShapeRegion()
self.regionComment.SetFormatMode(ogl.FORMAT_CENTRE_HORIZ)
font = wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT)
font.SetStyle(wx.ITALIC)
self.regionComment.SetFont(font)
+
+ self.regionComment.SetText(comment)
+
+ if self.comment:
self.AddRegion(self.regionComment)
self.regionLabel.SetProportions(0.0, 0.4)
-
- self.comment = comment
- self.regionComment.SetText(comment)
+ else:
+ self.ClearRegions()
+ self.AddRegion(self.regionLabel)
+ self.regionLabel.SetProportions(0.0, 1.0)
+
self.SetRegionSizes()
self.ReformatRegions()
More information about the grass-commit
mailing list