Skip to content

Commit 0b881d4

Browse files
committed
wxconsole_ui: reorder setting of terxt and fg/bg colours
Windows fails to update colours on text in the wx console. Rearranging the setting ofthe text and colours fixes this.
1 parent 8f3bca3 commit 0b881d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ def on_timer(self, event):
126126
self.status[obj.row].AddSpacer(20)
127127
self.values[obj.name] = value
128128
value = self.values[obj.name]
129+
value.SetLabel(obj.text)
129130
value.SetForegroundColour(obj.fg)
130131
value.SetBackgroundColour(obj.bg)
131132
# workaround wx bug on windows
132133
value._foregroundColour = obj.fg
133-
value.SetLabel(obj.text)
134134
self.panel.Layout()
135135
elif isinstance(obj, Text):
136136
'''request to add text to the console'''

0 commit comments

Comments
 (0)