From 5ef1313296aa13290567518c5254ef8af14eb846 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sun, 1 May 2011 02:31:36 +0000 Subject: [PATCH] - only show queued # in text if queued commandcount > 1 --- source/glest_game/type_instances/unit.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index b85359c7..9826d4ef 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -1476,8 +1476,12 @@ string Unit::getDesc() const { Commands::const_iterator it= commands.begin(); for(unsigned int i = 0; i < min((size_t)maxQueuedCommandDisplayCount,commands.size()); ++i) { const CommandType *ct = (*it)->getCommandType(); - //str += "\n" + ct->getDesc(this->getTotalUpgrade()); - str += "\n#" + intToStr(i+1) + " " + ct->getName(); + if(commands.size() == 1) { + str += "\n" + ct->getName(); + } + else { + str += "\n#" + intToStr(i+1) + " " + ct->getName(); + } it++; } }