Skip to content

Commit 6029c46

Browse files
committed
wxconsole_ui: use Refresh() and Update() to work around lack of redraw of text on windows
1 parent 8f3bca3 commit 6029c46

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: MAVProxy/modules/lib/wxconsole_ui.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import errno
22
import time
3-
import os
3+
import platform
44
import socket
55
from MAVProxy.modules.lib import mp_menu
66
from MAVProxy.modules.lib.wxconsole_util import Value, Text
@@ -131,6 +131,11 @@ def on_timer(self, event):
131131
# workaround wx bug on windows
132132
value._foregroundColour = obj.fg
133133
value.SetLabel(obj.text)
134+
if platform.system() == 'Windows':
135+
# more working around wx bugs in windows; without
136+
# these the display does not update on colour change
137+
value.Refresh()
138+
value.Update()
134139
self.panel.Layout()
135140
elif isinstance(obj, Text):
136141
'''request to add text to the console'''

0 commit comments

Comments
 (0)