IDE: fix primary buffer selection being reset on each write to console on X11. wxPython4
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Wed, 27 Jul 2022 10:44:54 +0200
branchwxPython4
changeset 3564 d2ca25a2d5d9
parent 3563 d2d2a11366b1
child 3565 6d3cb1ab1ef7
IDE: fix primary buffer selection being reset on each write to console on X11.

This problem was making debug_project IDE test randomly failing
BeremizIDE.py
--- a/BeremizIDE.py	Mon Jul 25 11:55:43 2022 +0200
+++ b/BeremizIDE.py	Wed Jul 27 10:44:54 2022 +0200
@@ -535,7 +535,8 @@
         event.Skip()
 
     def OnLogConsoleUpdateUI(self, event):
-        self.SetCopyBuffer(self.LogConsole.GetSelectedText(), True)
+        if event.GetUpdated()==wx.stc.STC_UPDATE_SELECTION:
+            self.SetCopyBuffer(self.LogConsole.GetSelectedText(), True)
         event.Skip()
 
     def OnLogConsoleMarginClick(self, event):