diff --git a/btc-UI/src/app/components/navbar/navbar.component.ts b/btc-UI/src/app/components/navbar/navbar.component.ts index 721dfe4..fd4e886 100755 --- a/btc-UI/src/app/components/navbar/navbar.component.ts +++ b/btc-UI/src/app/components/navbar/navbar.component.ts @@ -278,6 +278,17 @@ export class NavbarComponent implements OnInit, OnDestroy { this.currentPool = null; this.multiLegBaseRaceIdx = 0; this.currentLegRaceDisplay = ''; + + // Reset selectedRace to the first open race (1 if no stops, or the running/open one if stops exist) + this.selectedRace = this.getOpenRaceStartingFrom(1); + this.sharedStateService.updateSharedData({ + type: 'selectedRace', + value: this.selectedRace, + }); + const electronAPI = (window as any).electronAPI; + if (electronAPI) { + electronAPI.syncSelectedRace(this.selectedRace); + } this.updateEnabledHorseNumbers(); } if (data.type === 'selectedRace') {