From 620fc1cff1ab48315a44027e0e097a984149e4dd Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Sun, 1 May 2011 23:48:08 +0000 Subject: [PATCH] next try to fix the display crash problem .... --- source/glest_game/gui/gui.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/glest_game/gui/gui.cpp b/source/glest_game/gui/gui.cpp index 16687e9c..f5fad6d7 100644 --- a/source/glest_game/gui/gui.cpp +++ b/source/glest_game/gui/gui.cpp @@ -615,7 +615,7 @@ string Gui::computeDefaultInfoString(){ string result=""; - if((!selection.isEmpty()) && selection.isCommandable() && selection.isUniform()){ + if(selection.isCommandable() && selection.isUniform()){ // default is the description extension result=selection.getFrontUnit()->getDescExtension(); } @@ -631,7 +631,7 @@ void Gui::computeInfoString(int posDisplay){ display.setInfoText(computeDefaultInfoString()); - if((!selection.isEmpty()) && posDisplay!=invalidPos && selection.isCommandable()){ + if(posDisplay!=invalidPos && selection.isCommandable()){ if(!selectingBuilding){ if(posDisplay==cancelPos){ display.setInfoText(lang.get("Cancel")); @@ -808,8 +808,9 @@ void Gui::computeDisplay(){ } // refresh other things - computeInfoString(lastPosDisplay); - + if ( !isSelecting() && !isSelectingPos()) { + computeInfoString(lastPosDisplay); + } }