Fix template train build window not being refreshed for variants changes

pull/495/head
Jonathan G Rennison 1 year ago
parent 57437e7068
commit e061fa06fd

@ -630,6 +630,7 @@ public:
InvalidateWindowData(WC_REPLACE_VEHICLE, (VehicleType)this->window_number, 0); // Update the autoreplace window
InvalidateWindowClassesData(WC_BUILD_VEHICLE); // The build windows needs updating as well
InvalidateWindowClassesData(WC_BUILD_VIRTUAL_TRAIN);
return;
}
if ((item.flags & EngineDisplayFlags::Shaded) == EngineDisplayFlags::None) e = item.engine_id;

@ -1807,6 +1807,7 @@ struct BuildVehicleWindow : BuildVehicleWindowBase {
InvalidateWindowData(WC_REPLACE_VEHICLE, this->vehicle_type, 0); // Update the autoreplace window
InvalidateWindowClassesData(WC_BUILD_VEHICLE); // The build windows needs updating as well
InvalidateWindowClassesData(WC_BUILD_VIRTUAL_TRAIN);
return;
}
if ((item.flags & EngineDisplayFlags::Shaded) == EngineDisplayFlags::None) e = item.engine_id;
@ -1865,6 +1866,7 @@ struct BuildVehicleWindow : BuildVehicleWindowBase {
if (refresh) {
InvalidateWindowData(WC_REPLACE_VEHICLE, this->vehicle_type, 0); // Update the autoreplace window
InvalidateWindowClassesData(WC_BUILD_VEHICLE); // The build windows needs updating as well
InvalidateWindowClassesData(WC_BUILD_VIRTUAL_TRAIN);
return;
}
}
@ -2563,6 +2565,7 @@ struct BuildVehicleWindowTrainAdvanced final : BuildVehicleWindowBase {
if (refresh) {
InvalidateWindowData(WC_REPLACE_VEHICLE, this->vehicle_type, 0); // Update the autoreplace window
InvalidateWindowClassesData(WC_BUILD_VEHICLE); // The build windows needs updating as well
InvalidateWindowClassesData(WC_BUILD_VIRTUAL_TRAIN);
return;
}
}
@ -2584,6 +2587,7 @@ struct BuildVehicleWindowTrainAdvanced final : BuildVehicleWindowBase {
InvalidateWindowData(WC_REPLACE_VEHICLE, this->vehicle_type, 0); // Update the autoreplace window
InvalidateWindowClassesData(WC_BUILD_VEHICLE); // The build windows needs updating as well
InvalidateWindowClassesData(WC_BUILD_VIRTUAL_TRAIN);
return true;
}
if ((item.flags & EngineDisplayFlags::Shaded) == EngineDisplayFlags::None) e = item.engine_id;

@ -1202,6 +1202,7 @@ void EnginesMonthlyLoop()
if (refresh) {
SetWindowClassesDirty(WC_BUILD_VEHICLE);
SetWindowClassesDirty(WC_BUILD_VIRTUAL_TRAIN);
SetWindowClassesDirty(WC_REPLACE_VEHICLE);
}
}

Loading…
Cancel
Save