Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxconsole_ui: use Refresh() and Update() to work around lack of redra… #1468

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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