| 1580 | } |
| 1581 | |
| 1582 | void OnPaint() override |
| 1583 | { |
| 1584 | if (this->map_type == SMT_OWNER) { |
| 1585 | for (const LegendAndColour *tbl = _legend_table[this->map_type]; !tbl->end; ++tbl) { |
| 1586 | if (tbl->company != CompanyID::Invalid() && !Company::IsValidID(tbl->company)) { |
| 1587 | /* Rebuild the owner legend. */ |
| 1588 | BuildOwnerLegend(); |
| 1589 | this->InvalidateData(1); |
| 1590 | break; |
| 1591 | } |
| 1592 | } |
| 1593 | } |
| 1594 | |
| 1595 | this->DrawWidgets(); |
| 1596 | } |
| 1597 | |
| 1598 | void DrawWidget(const Rect &r, WidgetID widget) const override |
| 1599 | { |
nothing calls this directly
no test coverage detected