summaryrefslogtreecommitdiff
path: root/src/gui/console/ConsoleController.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-06-09 02:23:53 (GMT)
committer jacob1 <jfu614@gmail.com>2013-06-09 02:23:53 (GMT)
commit16cb95de641e2a28a40599f4b6c21336b78f7287 (patch)
treedca340f6f751aa49770759699045dad046e29c37 /src/gui/console/ConsoleController.cpp
parent0f5d0859b451f7cd716422a8b389129eb135ed60 (diff)
downloadpowder-16cb95de641e2a28a40599f4b6c21336b78f7287.zip
powder-16cb95de641e2a28a40599f4b6c21336b78f7287.tar.gz
fix problems with point queue, where it would draw a Point at A, a line from A to B, and a line from B to B every frame
Diffstat (limited to 'src/gui/console/ConsoleController.cpp')
-rw-r--r--src/gui/console/ConsoleController.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/console/ConsoleController.cpp b/src/gui/console/ConsoleController.cpp
index 602636f..b79470c 100644
--- a/src/gui/console/ConsoleController.cpp
+++ b/src/gui/console/ConsoleController.cpp
@@ -15,11 +15,13 @@ ConsoleController::ConsoleController(ControllerCallback * callback, CommandInter
void ConsoleController::EvaluateCommand(std::string command)
{
- if (command.substr(0, 6) == "!load ")
- CloseConsole();
- int returnCode = commandInterface->Command(command);
if(command.length())
+ {
+ if (command.substr(0, 6) == "!load ")
+ CloseConsole();
+ int returnCode = commandInterface->Command(command);
consoleModel->AddLastCommand(ConsoleCommand(command, returnCode, commandInterface->GetLastError()));
+ }
else
CloseConsole();
}