Always open vehicle window when ctrl-cloning (revert #6754)

This commit is contained in:
dP
2020-02-20 21:16:03 +03:00
parent 9b9a850d0b
commit 370a421942

View File

@@ -884,6 +884,10 @@ struct DepotWindow : Window {
*/
bool OnVehicleSelect(const Vehicle *v) override
{
if (DoCommandP(this->window_number, v->index, _ctrl_pressed ? 1 : 0, CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_TRAIN + v->type), CcCloneVehicle))
ResetObjectToPlace();
#if 0 // CM revert #6754
if (_ctrl_pressed) {
/* Share-clone, do not open new viewport, and keep tool active */
DoCommandP(this->window_number, v->index, 1, CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_TRAIN + v->type), nullptr);
@@ -893,6 +897,7 @@ struct DepotWindow : Window {
ResetObjectToPlace();
}
}
#endif
return true;
}