From 36859d9a4f7d321d80e4d0009a28353ee9528dbc Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 7 Oct 2024 21:06:46 +1100 Subject: [PATCH] wxconsole_ui: use Refresh() and Update() to work around lack of redraw of text on windows --- MAVProxy/modules/lib/wxconsole_ui.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MAVProxy/modules/lib/wxconsole_ui.py b/MAVProxy/modules/lib/wxconsole_ui.py index 68bd5706bd..444578d135 100644 --- a/MAVProxy/modules/lib/wxconsole_ui.py +++ b/MAVProxy/modules/lib/wxconsole_ui.py @@ -1,6 +1,6 @@ import errno import time -import os +import platform import socket from MAVProxy.modules.lib import mp_menu from MAVProxy.modules.lib.wxconsole_util import Value, Text @@ -131,6 +131,11 @@ def on_timer(self, event): # workaround wx bug on windows value._foregroundColour = obj.fg value.SetLabel(obj.text) + if platform.system() == 'Windows': + # more working around wx bugs in windows; without + # these the display does not update on colour change + value.Refresh() + value.Update() self.panel.Layout() elif isinstance(obj, Text): '''request to add text to the console'''