* 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. */
| 1160 | * @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. |
| 1161 | */ |
| 1162 | void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override |
| 1163 | { |
| 1164 | if (!gui_scope) return; |
| 1165 | const Industry *i = Industry::Get(this->window_number); |
| 1166 | if (IsProductionAlterable(i)) { |
| 1167 | const IndustrySpec *ind = GetIndustrySpec(i->type); |
| 1168 | this->editable = ind->UsesOriginalEconomy() ? EA_MULTIPLIER : EA_RATE; |
| 1169 | } else { |
| 1170 | this->editable = EA_NONE; |
| 1171 | } |
| 1172 | } |
| 1173 | |
| 1174 | bool IsNewGRFInspectable() const override |
| 1175 | { |
nothing calls this directly
no test coverage detected