[GRASS-SVN] r48679 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Oct 8 15:33:21 EDT 2011
Author: martinl
Date: 2011-10-08 12:33:21 -0700 (Sat, 08 Oct 2011)
New Revision: 48679
Modified:
grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py
Log:
wxGUI/mcalc: fix insertion point for fns
Modified: grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py 2011-10-08 19:26:05 UTC (rev 48678)
+++ grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py 2011-10-08 19:33:21 UTC (rev 48679)
@@ -438,12 +438,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