MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / OnInvalidateData

Method OnInvalidateData

src/vehicle_gui.cpp:3384–3393  ·  view source on GitHub ↗

* Some data on this window has become invalid. * @param data Information about the changed data. * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details. */

Source from the content-addressed store, hash-verified

3382 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
3383 */
3384 void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
3385 {
3386 if (data == VIWD_AUTOREPLACE) {
3387 /* Autoreplace replaced the vehicle.
3388 * Nothing to do for this window. */
3389 return;
3390 }
3391
3392 this->UpdateButtonStatus();
3393 }
3394
3395 bool IsNewGRFInspectable() const override
3396 {

Callers

nothing calls this directly

Calls 1

UpdateButtonStatusMethod · 0.95

Tested by

no test coverage detected