ソースを参照

wxGUI: EnsureCaretVisible?() in write() probably causes window crash, trac https://trac.osgeo.org/grass/ticket/201
(merge from devbr6, https://trac.osgeo.org/grass/changeset/31931)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@31933 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 17 年 前
コミット
182088c4c2
1 ファイル変更4 行追加4 行削除
  1. 4 4
      gui/wxpython/gui_modules/goutput.py

+ 4 - 4
gui/wxpython/gui_modules/goutput.py

@@ -356,7 +356,7 @@ class GMStdout:
         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 @@ class GMStderr:
                 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 @@ class GMStderr:
                     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':