forked from qt-creator/qt-creator
QmlDesigner: Add enter and leave event support to 3D view
Fixes: QDS-10917 Change-Id: Iefcf92bd4a747d35f44e47c438548338fccfc4a2 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
@@ -213,7 +213,7 @@ void Qt5InformationNodeInstanceServer::handleInputEvents()
|
||||
// Peek at next command. If that is also a wheel with same button/modifiers
|
||||
// state, skip this event and add the angle delta to the next one.
|
||||
auto nextCommand = m_pendingInputEventCommands[i + 1];
|
||||
if (nextCommand.type() == QEvent::MouseMove
|
||||
if (nextCommand.type() == QEvent::Wheel
|
||||
&& nextCommand.button() == command.button()
|
||||
&& nextCommand.buttons() == command.buttons()
|
||||
&& nextCommand.modifiers() == command.modifiers()) {
|
||||
@@ -232,6 +232,12 @@ void Qt5InformationNodeInstanceServer::handleInputEvents()
|
||||
QKeyEvent *ke = new QKeyEvent(command.type(), command.key(), command.modifiers(),
|
||||
QString(), command.autoRepeat(), command.count());
|
||||
QGuiApplication::sendEvent(m_editView3DData.window, ke);
|
||||
} else if (command.type() == QEvent::Enter) {
|
||||
QEnterEvent *ee = new QEnterEvent(command.pos(), {}, {});
|
||||
QGuiApplication::sendEvent(m_editView3DData.window, ee);
|
||||
} else if (command.type() == QEvent::Leave) {
|
||||
QEvent *e = new QEvent(command.type());
|
||||
QGuiApplication::sendEvent(m_editView3DData.window, e);
|
||||
} else {
|
||||
if (command.type() == QEvent::MouseMove && i < m_pendingInputEventCommands.size() - 1) {
|
||||
// Peek at next command. If that is also a move with only difference being
|
||||
|
||||
Reference in New Issue
Block a user