[GRASS-SVN] r31931 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 1 10:50:50 EDT 2008


Author: martinl
Date: 2008-07-01 10:50:50 -0400 (Tue, 01 Jul 2008)
New Revision: 31931

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
Log:
wxGUI: EnsureCaretVisible() in write() probably causes window crash, trac #201


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py	2008-07-01 14:42:51 UTC (rev 31930)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py	2008-07-01 14:50:50 UTC (rev 31931)
@@ -356,7 +356,7 @@
         for line in s.split(os.linesep):
             p1 = self.gmstc.GetCurrentPos() # get caret position
             self.gmstc.AddTextWrapped(line, wrap=None) # no wrapping && adds os.linesep
-            self.gmstc.EnsureCaretVisible()
+            # self.gmstc.EnsureCaretVisible()
             p2 = self.gmstc.GetCurrentPos()
             self.gmstc.StartStyling(p1, 0xff)
             self.gmstc.SetStyling(p2 - p1 + 1, self.gmstc.StyleOutput)
@@ -422,7 +422,7 @@
                 if len(line) > 0:
                     p1 = self.gmstc.GetCurrentPos()
                     self.gmstc.AddTextWrapped(line, wrap=60) # wrap && add os.linesep
-                    self.gmstc.EnsureCaretVisible()
+                    # self.gmstc.EnsureCaretVisible()
                     p2 = self.gmstc.GetCurrentPos()
                     self.gmstc.StartStyling(p1, 0xff)
                     self.gmstc.SetStyling(p2 - p1 + 1, self.gmstc.StyleUnknown)
@@ -435,11 +435,11 @@
                     message = 'WARNING: ' + message
                 elif type == 'error':
                     message = 'ERROR: ' + message
-                if '\n' not in message:
+                if os.linesep not in message:
                     self.gmstc.AddTextWrapped(message, wrap=60) #wrap && add os.linesep
                 else:
                     self.gmstc.AddText(message + os.linesep)
-                self.gmstc.EnsureCaretVisible()
+                # self.gmstc.EnsureCaretVisible()
                 p2 = self.gmstc.GetCurrentPos()
                 self.gmstc.StartStyling(p1, 0xff)
                 if type == 'error':



More information about the grass-commit mailing list