Skip to content

Commit

Permalink
fixed #23454: delay call edit element
Browse files Browse the repository at this point in the history
  • Loading branch information
Eism committed Jul 15, 2024
1 parent c758d01 commit 9e290b6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/notation/view/notationviewinputcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
#include <QTimer>
#include <QtMath>

#include "log.h"
#include "commonscene/commonscenetypes.h"
#include "abstractelementpopupmodel.h"

#include "log.h"

using namespace mu;
using namespace mu::notation;
using namespace mu::engraving;
Expand Down Expand Up @@ -962,7 +963,11 @@ void NotationViewInputController::mouseDoubleClickEvent(QMouseEvent* event)
}

if (!actionCode.empty()) {
dispatcher()->dispatch(actionCode, ActionData::make_arg1<PointF>(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<PointF>(m_logicalBeginPoint));
});
}
}

Expand Down

0 comments on commit 9e290b6

Please sign in to comment.