From e788deb1fc8077b65a09cd2bb1702582050c82cb Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 29 Aug 2023 14:10:21 +0200 Subject: [PATCH] TextEditor: add force update current Editor in action handler This can be used to update the editor widget connected in the action handler if the editor widget inside one editor changes. Change-Id: Idc9ea119aa2eaab34bd249c59ab9dfb255556fa1 Reviewed-by: Marcus Tillmanns Reviewed-by: --- src/plugins/texteditor/texteditoractionhandler.cpp | 5 +++++ src/plugins/texteditor/texteditoractionhandler.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index 4224b504433..d22f8c96570 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -565,4 +565,9 @@ TextEditorActionHandler::~TextEditorActionHandler() delete d; } +void TextEditorActionHandler::updateCurrentEditor() +{ + d->updateCurrentEditor(Core::EditorManager::currentEditor()); +} + } // namespace TextEditor diff --git a/src/plugins/texteditor/texteditoractionhandler.h b/src/plugins/texteditor/texteditoractionhandler.h index 2bdb8efff3e..ce19e8535f9 100644 --- a/src/plugins/texteditor/texteditoractionhandler.h +++ b/src/plugins/texteditor/texteditoractionhandler.h @@ -49,6 +49,8 @@ public: uint optionalActions() const; ~TextEditorActionHandler(); + void updateCurrentEditor(); + private: Internal::TextEditorActionHandlerPrivate *d; };