From d52a07ef76d3620a7f1eca680bba1cf69f465bd8 Mon Sep 17 00:00:00 2001 From: lethosor Date: Wed, 14 May 2014 18:56:30 -0400 Subject: [PATCH] Dismiss previous command prompt before creating a new one --- plugins/command-prompt.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/command-prompt.cpp b/plugins/command-prompt.cpp index d7a8e230c..19460f19b 100644 --- a/plugins/command-prompt.cpp +++ b/plugins/command-prompt.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include @@ -166,6 +167,10 @@ void viewscreen_commandpromptst::feed(std::set *events) DFHACK_PLUGIN("command-prompt"); command_result show_prompt(color_ostream &out, std::vector & parameters) { + if (Gui::getCurFocus() == "dfhack/commandprompt") + { + Screen::dismiss(Gui::getCurViewscreen(true)); + } std::string params; for(size_t i=0;i