Skip to content

Commit

Permalink
wxconsole_ui: use Refresh() and Update() to work around lack of redra…
Browse files Browse the repository at this point in the history
…w of text on windows
  • Loading branch information
peterbarker committed Oct 7, 2024
1 parent 8f3bca3 commit 36859d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion MAVProxy/modules/lib/wxconsole_ui.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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'''
Expand Down

0 comments on commit 36859d9

Please sign in to comment.