From d2293867ba0914993866275e173880c9f079c08a Mon Sep 17 00:00:00 2001 From: Stanislav Bas Date: Fri, 5 Jun 2015 22:44:06 +0300 Subject: [PATCH] Add the explanation to Console::acceptCommand() --- apps/openmw/mwgui/console.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/openmw/mwgui/console.cpp b/apps/openmw/mwgui/console.cpp index 62eeca012..a1f564ffa 100644 --- a/apps/openmw/mwgui/console.cpp +++ b/apps/openmw/mwgui/console.cpp @@ -294,6 +294,10 @@ namespace MWGui mCommandHistory.push_back(cm); mCurrent = mCommandHistory.end(); mEditString.clear(); + + // Reset the command line before the command execution. + // It prevents re-triggering the acceptCommand() event during + // the actual command execution. mCommandLine->setCaption(""); execute (cm);