diff --git a/RMV_Digital_Board_light.py b/RMV_Digital_Board_light.py index 29ae31c..0918bd7 100644 --- a/RMV_Digital_Board_light.py +++ b/RMV_Digital_Board_light.py @@ -262,6 +262,10 @@ class RMVApp(App): departures = fetch_departures(self.current_id) _, west, east = build_table_data(departures) + # Sortieren nach Minutenwert, wie im Lightmodus + west.sort(key=lambda row: int(row[2]) if row[2].isdigit() else 999) + east.sort(key=lambda row: int(row[2]) if row[2].isdigit() else 999) + self.update_table(self.table_west, west) self.update_table(self.table_east, east) except Exception as e: @@ -270,7 +274,6 @@ class RMVApp(App): def update_table(self, table: DataTable, rows): """Befüllt eine DataTable mit neuen Daten und Farbcodes""" table.clear() # Nur Zeilen löschen, Spalten bleiben - for line, dest, mins in rows: color_hex = line_colors.get(line) if color_hex: