Skip to content

Commit

Permalink
wxconsole_ui: reorder setting of terxt and fg/bg colours
Browse files Browse the repository at this point in the history
Windows fails to update colours on text in the wx console.  Rearranging the setting ofthe text and colours fixes this.
  • Loading branch information
peterbarker committed Oct 7, 2024
1 parent 8f3bca3 commit 0b881d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MAVProxy/modules/lib/wxconsole_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ def on_timer(self, event):
self.status[obj.row].AddSpacer(20)
self.values[obj.name] = value
value = self.values[obj.name]
value.SetLabel(obj.text)
value.SetForegroundColour(obj.fg)
value.SetBackgroundColour(obj.bg)
# workaround wx bug on windows
value._foregroundColour = obj.fg
value.SetLabel(obj.text)
self.panel.Layout()
elif isinstance(obj, Text):
'''request to add text to the console'''
Expand Down

0 comments on commit 0b881d4

Please sign in to comment.