TBTR: Remove unitnumber_digits field/param from main window

This commit is contained in:
Jonathan G Rennison
2020-09-21 03:20:59 +01:00
parent aea747be08
commit 09d5be1aad
4 changed files with 6 additions and 10 deletions

View File

@@ -970,7 +970,7 @@ public:
switch (index) { switch (index) {
case ADI_TEMPLATE_REPLACE: // TemplateReplace Window case ADI_TEMPLATE_REPLACE: // TemplateReplace Window
if (vli.vtype == VEH_TRAIN) { if (vli.vtype == VEH_TRAIN) {
ShowTemplateReplaceWindow(this->unitnumber_digits); ShowTemplateReplaceWindow();
} }
break; break;
case ADI_REPLACE: // Replace window case ADI_REPLACE: // Replace window

View File

@@ -190,7 +190,6 @@ class TemplateReplaceWindow : public Window {
private: private:
GUIGroupList groups; ///< List of groups GUIGroupList groups; ///< List of groups
uint unitnumber_digits;
std::vector<int> indents; ///< Indentation levels std::vector<int> indents; ///< Indentation levels
@@ -210,14 +209,11 @@ private:
bool editInProgress; bool editInProgress;
public: public:
TemplateReplaceWindow(WindowDesc *wdesc, uint unitnumber_digits) : Window(wdesc) TemplateReplaceWindow(WindowDesc *wdesc) : Window(wdesc)
{ {
// listing/sorting // listing/sorting
templates.SetSortFuncs(this->template_sorter_funcs); templates.SetSortFuncs(this->template_sorter_funcs);
// From BaseVehicleListWindow
this->unitnumber_digits = unitnumber_digits;
this->sel_railtype = INVALID_RAILTYPE; this->sel_railtype = INVALID_RAILTYPE;
this->details_height = 10 * FONT_HEIGHT_NORMAL + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM; 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);
} }

View File

@@ -21,6 +21,6 @@
typedef GUIList<const Group*> GUIGroupList; typedef GUIList<const Group*> GUIGroupList;
void ShowTemplateReplaceWindow(uint); void ShowTemplateReplaceWindow();
#endif #endif

View File

@@ -2087,7 +2087,7 @@ public:
break; break;
case ADI_TEMPLATE_REPLACE: case ADI_TEMPLATE_REPLACE:
if (vli.vtype == VEH_TRAIN) { if (vli.vtype == VEH_TRAIN) {
ShowTemplateReplaceWindow(this->unitnumber_digits); ShowTemplateReplaceWindow();
} }
break; break;
case ADI_SERVICE: // Send for servicing case ADI_SERVICE: // Send for servicing