ProjectNeura / LEADS

Enable your racing car with powerful, data-driven instrumentation, control, and analysis systems, all wrapped up in a gorgeous look.
https://leads.projectneura.org
Apache License 2.0
257 stars 54 forks source link

The Secondary Screen does not Render #335

Closed ATATC closed 4 months ago

ATATC commented 4 months ago

Cause

In #334, a fatal change accidentally put context_manager.layout([widgets], 0, window_index) under the condition that the screen has to be wider than 2:1.

The code intended to perform like:

if num_widgets > 2:
    widgets.insert(0, SpeedTrendMeter(w.root(), "CTkLabel", height=w.height(), variable=var_speed_trend,
                                      font=fonts[1]))
context_manager.layout([widgets], 0, window_index)

However, it was accidentally written as:

if num_widgets > 2:
    widgets.insert(0, SpeedTrendMeter(w.root(), "CTkLabel", height=w.height(), variable=var_speed_trend,
                                      font=fonts[1]))
    context_manager.layout([widgets], 0, window_index)