From ada1351593d3d288fe310caf34e9d710b976b193 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sun, 7 Jun 2009 14:38:23 +0100 Subject: [PATCH] Small optimisation to station highlighting --- src/Game.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Game.cpp b/src/Game.cpp index feee3e2..58da2bf 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -178,9 +178,11 @@ void Game::update(IPickBufferPtr aPickBuffer, int aDelta) void Game::nearStation(IStationPtr aStation) { leftStation(); // Clear any previous station - - myActiveStation = aStation; - aStation->setHighlightVisible(true); + + if (aStation != myActiveStation) { + myActiveStation = aStation; + aStation->setHighlightVisible(true); + } } // Signal that we are no longer at or approaching a station -- 2.39.2