[GRASS-SVN] r42253 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu May 13 18:32:10 EDT 2010
Author: martinl
Date: 2010-05-13 18:32:09 -0400 (Thu, 13 May 2010)
New Revision: 42253
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py
Log:
wxGUI/mcalc: fix insert position for '()'
(merge r42252 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 2010-05-13 22:30:11 UTC (rev 42252)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mcalc_builder.py 2010-05-13 22:32:09 UTC (rev 42253)
@@ -359,7 +359,7 @@
item = event.GetString()
self._addSomething(item)
- def _addSomething(self,what):
+ def _addSomething(self, what):
"""!Inserts operators, map names, and functions into text area
"""
self.text_mcalc.SetFocus()
@@ -381,6 +381,8 @@
newmcalcstr += ' ' + mcalcstr[position:]
self.text_mcalc.SetValue(newmcalcstr)
+ if what == '()':
+ position_offset -= 1
self.text_mcalc.SetInsertionPoint(position + position_offset)
self.text_mcalc.Update()
More information about the grass-commit
mailing list