[GRASS-SVN] r48680 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Oct 8 15:46:54 EDT 2011
Author: martinl
Date: 2011-10-08 12:46:54 -0700 (Sat, 08 Oct 2011)
New Revision: 48680
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py
Log:
wxGUI/mcalc: fix insertion point for fns
(merge r48679 from trunk)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py 2011-10-08 19:33:21 UTC (rev 48679)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py 2011-10-08 19:46:54 UTC (rev 48680)
@@ -422,12 +422,11 @@
except:
pass
- newmcalcstr += what
+ newmcalcstr += what + ' ' + mcalcstr[position:]
position_offset += len(what)
- newmcalcstr += ' ' + mcalcstr[position:]
self.text_mcalc.SetValue(newmcalcstr)
- if what == '()':
+ if len(what) > 1 and what[-2:] == '()':
position_offset -= 1
self.text_mcalc.SetInsertionPoint(position + position_offset)
self.text_mcalc.Update()
More information about the grass-commit
mailing list