Revert "Make old group creation methods consistent with new one by calling the same command"

This reverts commit c2785be685.
This commit is contained in:
Andreas Schmitt
2021-06-21 00:31:36 +02:00
parent c2785be685
commit 64488fdf29
2 changed files with 3 additions and 7 deletions

View File

@@ -2552,8 +2552,8 @@ public:
break;
case WID_O_ADD_VEH_GROUP: {
this->SetDirty();
DoCommandP(0, this->vehicle->index | 0,0 , CMD_CREATE_GROUP_AUTO_NAME, nullptr, nullptr);
this->query_text_widget = WID_O_ADD_VEH_GROUP;
ShowQueryString(STR_EMPTY, STR_GROUP_RENAME_CAPTION, MAX_LENGTH_GROUP_NAME_CHARS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
break;
}

View File

@@ -2346,11 +2346,7 @@ public:
break;
case ADI_CREATE_GROUP:
if (!this->vehicles.empty()) {
const VehicleID vindex = (*this->vehicles.begin())->index;
this->SetDirty();
DoCommandP(0, vindex | (1 << 31),0 , CMD_CREATE_GROUP_AUTO_NAME, nullptr, nullptr);
}
ShowQueryString(STR_EMPTY, STR_GROUP_RENAME_CAPTION, MAX_LENGTH_GROUP_NAME_CHARS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
break;
case ADI_TRACERESTRICT_SLOT_MGMT: {