diff --git a/src/group_gui.cpp b/src/group_gui.cpp index 039c14b6ee..d4b653f837 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -970,7 +970,7 @@ public: switch (index) { case ADI_TEMPLATE_REPLACE: // TemplateReplace Window if (vli.vtype == VEH_TRAIN) { - ShowTemplateReplaceWindow(this->unitnumber_digits); + ShowTemplateReplaceWindow(); } break; case ADI_REPLACE: // Replace window diff --git a/src/tbtr_template_gui_main.cpp b/src/tbtr_template_gui_main.cpp index 7cc168cd59..d8321eb1e2 100644 --- a/src/tbtr_template_gui_main.cpp +++ b/src/tbtr_template_gui_main.cpp @@ -190,7 +190,6 @@ class TemplateReplaceWindow : public Window { private: GUIGroupList groups; ///< List of groups - uint unitnumber_digits; std::vector indents; ///< Indentation levels @@ -210,14 +209,11 @@ private: bool editInProgress; public: - TemplateReplaceWindow(WindowDesc *wdesc, uint unitnumber_digits) : Window(wdesc) + TemplateReplaceWindow(WindowDesc *wdesc) : Window(wdesc) { // listing/sorting templates.SetSortFuncs(this->template_sorter_funcs); - // From BaseVehicleListWindow - this->unitnumber_digits = unitnumber_digits; - this->sel_railtype = INVALID_RAILTYPE; this->details_height = 10 * FONT_HEIGHT_NORMAL + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM; @@ -811,7 +807,7 @@ public: } }; -void ShowTemplateReplaceWindow(uint unitnumber_digits) +void ShowTemplateReplaceWindow() { - new TemplateReplaceWindow(&_replace_rail_vehicle_desc, unitnumber_digits); + new TemplateReplaceWindow(&_replace_rail_vehicle_desc); } diff --git a/src/tbtr_template_gui_main.h b/src/tbtr_template_gui_main.h index 9ee849a2e2..f16cea9e24 100644 --- a/src/tbtr_template_gui_main.h +++ b/src/tbtr_template_gui_main.h @@ -21,6 +21,6 @@ typedef GUIList GUIGroupList; -void ShowTemplateReplaceWindow(uint); +void ShowTemplateReplaceWindow(); #endif diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 8fc9257928..19627d07a4 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -2087,7 +2087,7 @@ public: break; case ADI_TEMPLATE_REPLACE: if (vli.vtype == VEH_TRAIN) { - ShowTemplateReplaceWindow(this->unitnumber_digits); + ShowTemplateReplaceWindow(); } break; case ADI_SERVICE: // Send for servicing