diff options
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r-- | src/rail_gui.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index a7d7c36a4..ea0152bf0 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -414,9 +414,9 @@ struct BuildRailToolbarWindow : Window { RailType railtype; ///< Rail type to build. int last_user_action; ///< Last started user action. - BuildRailToolbarWindow(const WindowDesc *desc, WindowNumber window_number, RailType railtype) : Window() + BuildRailToolbarWindow(const WindowDesc *desc, RailType railtype) : Window() { - this->InitNested(desc); + this->InitNested(desc, TRANSPORT_RAIL); this->SetupRailToolbar(railtype); this->DisableWidget(WID_RAT_REMOVE); this->last_user_action = WIDGET_LIST_END; @@ -735,6 +735,7 @@ struct BuildRailToolbarWindow : Window { DeleteWindowById(WC_BUILD_SIGNAL, TRANSPORT_RAIL); DeleteWindowById(WC_BUILD_STATION, TRANSPORT_RAIL); DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_RAIL); + DeleteWindowById(WC_BUILD_WAYPOINT, TRANSPORT_RAIL); DeleteWindowById(WC_SELECT_STATION, 0); DeleteWindowByClass(WC_BUILD_BRIDGE); } @@ -841,7 +842,7 @@ Window *ShowBuildRailToolbar(RailType railtype) DeleteWindowByClass(WC_BUILD_TOOLBAR); _cur_railtype = railtype; _remove_button_clicked = false; - return new BuildRailToolbarWindow(&_build_rail_desc, TRANSPORT_RAIL, railtype); + return new BuildRailToolbarWindow(&_build_rail_desc, railtype); } EventState RailToolbarGlobalHotkeys(uint16 key, uint16 keycode) @@ -1533,14 +1534,14 @@ public: case WID_BS_DRAG_SIGNALS_DENSITY_DECREASE: if (_settings_client.gui.drag_signals_density > 1) { _settings_client.gui.drag_signals_density--; - SetWindowDirty(WC_GAME_OPTIONS, 0); + SetWindowDirty(WC_GAME_OPTIONS, WN_GAME_OPTIONS_GAME_SETTINGS); } break; case WID_BS_DRAG_SIGNALS_DENSITY_INCREASE: if (_settings_client.gui.drag_signals_density < 20) { _settings_client.gui.drag_signals_density++; - SetWindowDirty(WC_GAME_OPTIONS, 0); + SetWindowDirty(WC_GAME_OPTIONS, WN_GAME_OPTIONS_GAME_SETTINGS); } break; @@ -1777,7 +1778,7 @@ static const NWidgetPart _nested_build_waypoint_widgets[] = { static const WindowDesc _build_waypoint_desc( WDP_AUTO, 0, 0, - WC_BUILD_DEPOT, WC_BUILD_TOOLBAR, + WC_BUILD_WAYPOINT, WC_BUILD_TOOLBAR, WDF_CONSTRUCTION, _nested_build_waypoint_widgets, lengthof(_nested_build_waypoint_widgets) ); |