diff options
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r-- | src/rail_gui.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 177f72acc..37c365881 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -437,18 +437,6 @@ struct BuildRailToolbarWindow : Window { } /** - * Some data on this window has become invalid. - * @param data Information about the changed data. - * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details. - */ - void OnInvalidateData(int data = 0, bool gui_scope = true) override - { - if (!gui_scope) return; - - if (!CanBuildVehicleInfrastructure(VEH_TRAIN)) delete this; - } - - /** * Configures the rail toolbar for railtype given * @param railtype the railtype to display */ @@ -781,7 +769,6 @@ struct BuildRailToolbarWindow : Window { */ static EventState RailToolbarGlobalHotkeys(int hotkey) { - if (_game_mode != GM_NORMAL || !CanBuildVehicleInfrastructure(VEH_TRAIN)) return ES_NOT_HANDLED; extern RailType _last_built_railtype; Window *w = ShowBuildRailToolbar(_last_built_railtype); if (w == nullptr) return ES_NOT_HANDLED; |