[GRASS-SVN] r31933 - grass/trunk/gui/wxpython/gui_modules

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


Author: martinl
Date: 2008-07-01 10:52:29 -0400 (Tue, 01 Jul 2008)
New Revision: 31933

Modified:
   grass/trunk/gui/wxpython/gui_modules/goutput.py
Log:
wxGUI: EnsureCaretVisible?() in write() probably causes window crash, trac #201 
(merge from devbr6, r31931)


Modified: grass/trunk/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/goutput.py	2008-07-01 14:52:02 UTC (rev 31932)
+++ grass/trunk/gui/wxpython/gui_modules/goutput.py	2008-07-01 14:52:29 UTC (rev 31933)
@@ -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