From 9e290b6a5886d3f6b70892ad274457fc0ef5a809 Mon Sep 17 00:00:00 2001 From: Eism Date: Thu, 11 Jul 2024 12:35:09 +0300 Subject: [PATCH] fixed #23454: delay call edit element --- src/notation/view/notationviewinputcontroller.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/notation/view/notationviewinputcontroller.cpp b/src/notation/view/notationviewinputcontroller.cpp index ca06a3b27df43..c914f939780cf 100644 --- a/src/notation/view/notationviewinputcontroller.cpp +++ b/src/notation/view/notationviewinputcontroller.cpp @@ -27,10 +27,11 @@ #include #include -#include "log.h" #include "commonscene/commonscenetypes.h" #include "abstractelementpopupmodel.h" +#include "log.h" + using namespace mu; using namespace mu::notation; using namespace mu::engraving; @@ -962,7 +963,11 @@ void NotationViewInputController::mouseDoubleClickEvent(QMouseEvent* event) } if (!actionCode.empty()) { - dispatcher()->dispatch(actionCode, ActionData::make_arg1(m_logicalBeginPoint)); + //! NOTE: call with delay because the action can open dialogs, + //! but we need to finish events processing first + QTimer::singleShot(100, [this, actionCode]() { + dispatcher()->dispatch(actionCode, ActionData::make_arg1(m_logicalBeginPoint)); + }); } }