Plans: Cache whether any plans are currently visible

This commit is contained in:
Jonathan G Rennison
2024-01-17 19:03:10 +00:00
parent 1159224d6f
commit 3d87cfeca5
9 changed files with 65 additions and 5 deletions

View File

@@ -2726,7 +2726,7 @@ static void ViewportDrawVehicleRouteSteps(const Viewport * const vp)
void ViewportDrawPlans(const Viewport *vp)
{
if (Plan::GetNumItems() == 0 && !(_current_plan && _current_plan->temp_line->tiles.size() > 1)) return;
if (!AreAnyPlansVisible()) return;
DrawPixelInfo dpi_for_text = _vdd->MakeDPIForText();
_cur_dpi = &dpi_for_text;