diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp index 2096bc2c1d..8ec9935dc9 100644 --- a/src/group_cmd.cpp +++ b/src/group_cmd.cpp @@ -342,6 +342,7 @@ CommandCost CmdCreateGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 InvalidateWindowData(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, _current_company).Pack()); InvalidateWindowData(WC_COMPANY_COLOUR, g->owner, g->vehicle_type); + InvalidateWindowData(WC_TEMPLATEGUI_MAIN, 0, 0, 0); } return CommandCost(); @@ -401,6 +402,7 @@ CommandCost CmdDeleteGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 InvalidateWindowData(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, _current_company).Pack()); InvalidateWindowData(WC_COMPANY_COLOUR, _current_company, vt); + InvalidateWindowData(WC_TEMPLATEGUI_MAIN, 0, 0, 0); } return CommandCost(); @@ -471,6 +473,7 @@ CommandCost CmdAlterGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 InvalidateWindowData(WC_REPLACE_VEHICLE, g->vehicle_type, 1); InvalidateWindowData(GetWindowClassForVehicleType(g->vehicle_type), VehicleListIdentifier(VL_GROUP_LIST, g->vehicle_type, _current_company).Pack()); InvalidateWindowData(WC_COMPANY_COLOUR, g->owner, g->vehicle_type); + InvalidateWindowData(WC_TEMPLATEGUI_MAIN, 0, 0, 0); } return CommandCost(); diff --git a/src/group_gui.cpp b/src/group_gui.cpp index d31d3cad7b..039c14b6ee 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -946,7 +946,6 @@ public: void OnQueryTextFinished(char *str) override { if (str != nullptr) DoCommandP(0, this->group_rename, 0, CMD_ALTER_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_RENAME), nullptr, str); - InvalidateWindowData(WC_TEMPLATEGUI_MAIN, 0, 0, 0); this->group_rename = INVALID_GROUP; }