close console when using the !load command

This commit is contained in:
jacob1 2012-10-20 15:18:29 -04:00 committed by Simon Robertshaw
parent 3a29fc0268
commit 5ef6bd8507

View File

@ -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()