summaryrefslogtreecommitdiff
path: root/src/console/ConsoleController.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-10-20 19:18:29 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-26 14:15:45 (GMT)
commit5ef6bd8507becc26c72dbb4d3acb89c68a7c865a (patch)
tree3ee753ded8a854e01b18095394761edc42b64d36 /src/console/ConsoleController.cpp
parent3a29fc0268dbda68e80f7de586c6692ba7a11565 (diff)
downloadpowder-5ef6bd8507becc26c72dbb4d3acb89c68a7c865a.zip
powder-5ef6bd8507becc26c72dbb4d3acb89c68a7c865a.tar.gz
close console when using the !load command
Diffstat (limited to 'src/console/ConsoleController.cpp')
-rw-r--r--src/console/ConsoleController.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/console/ConsoleController.cpp b/src/console/ConsoleController.cpp
index 618137d..7d61303 100644
--- a/src/console/ConsoleController.cpp
+++ b/src/console/ConsoleController.cpp
@@ -22,12 +22,13 @@ ConsoleController::ConsoleController(ControllerCallback * callback, CommandInter
void ConsoleController::EvaluateCommand(std::string command)
{
+ if (command.substr(0, 5) == "!load ")
+ CloseConsole();
int returnCode = commandInterface->Command(command);
if(command.length())
consoleModel->AddLastCommand(ConsoleCommand(command, returnCode, commandInterface->GetLastError()));
else
- if(ui::Engine::Ref().GetWindow() == consoleView)
- ui::Engine::Ref().CloseWindow();
+ CloseConsole();
}
void ConsoleController::CloseConsole()