diff options
-rw-r--r-- | src/plugins/python/pythonutils.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index dced51518b..651510161c 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -31,6 +31,7 @@ #include "pythonrunconfiguration.h" #include "pythonsettings.h" +#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/infobar.h> #include <coreplugin/progressmanager/progressmanager.h> @@ -446,7 +447,16 @@ void PyLSConfigureAssistant::resetEditorInfoBar(TextEditor::TextDocument *docume PyLSConfigureAssistant::PyLSConfigureAssistant(QObject *parent) : QObject(parent) -{} +{ + Core::EditorManager::instance(); + connect(Core::EditorManager::instance(), + &Core::EditorManager::documentClosed, + this, + [this](Core::IDocument *document) { + if (auto textDocument = qobject_cast<TextEditor::TextDocument *>(document)) + resetEditorInfoBar(textDocument); + }); +} } // namespace Internal } // namespace Python |