diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/toolbar_gui.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 6c09c3a71..c5d415be0 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -1045,7 +1045,7 @@ struct MainToolbarWindow : Window { * Since enabled state is the default, just disable when needed */ this->SetWidgetsDisabledState(_local_company == COMPANY_SPECTATOR, TBN_RAILS, TBN_ROADS, TBN_WATER, TBN_AIR, TBN_LANDSCAPE, WIDGET_LIST_END); /* disable company list drop downs, if there are no companies */ - this->SetWidgetsDisabledState(Company::GetNumItems() == TBN_PAUSE, TBN_STATIONS, TBN_FINANCES, TBN_TRAINS, TBN_ROADVEHS, TBN_SHIPS, TBN_AIRCRAFTS, WIDGET_LIST_END); + this->SetWidgetsDisabledState(Company::GetNumItems() == 0, TBN_STATIONS, TBN_FINANCES, TBN_TRAINS, TBN_ROADVEHS, TBN_SHIPS, TBN_AIRCRAFTS, WIDGET_LIST_END); this->SetWidgetDisabledState(TBN_RAILS, !CanBuildVehicleInfrastructure(VEH_TRAIN)); this->SetWidgetDisabledState(TBN_AIR, !CanBuildVehicleInfrastructure(VEH_AIRCRAFT)); @@ -1138,7 +1138,9 @@ struct MainToolbarWindow : Window { virtual void OnTimeout() { - for (uint i = TBN_SETTINGS; i < this->widget_count - 1; i++) { + /* We do not want to automatically raise the pause, fast forward and + * switchbar buttons; they have to stay down when pressed etc. */ + for (uint i = TBN_SETTINGS; i < TBN_SWITCHBAR; i++) { if (this->IsWidgetLowered(i)) { this->RaiseWidget(i); this->SetWidgetDirty(i); |