summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Action/ActionView.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2019-03-12 16:17:03 +0200
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2019-03-13 09:39:24 +0000
commitb874d10d0aa1a733dd571234846aa4ff73b2f491 (patch)
tree67c5dc624b3490a56b9ac34e817a1c9cf551b924 /src/Authoring/Studio/Palettes/Action/ActionView.cpp
parent4f6db42ce61e5a712ed196e96e0d90a1780c73fd (diff)
Fix cursor issues with drag adjusting float fields
Now properly account for the screen when setting the mouse position. Also use the center of the parent widget for reference point instead of the center of the main screen. This fixes an issue where cursor sometimes resets incorrectly to what the scene view needs instead of the default arrow after the drag. Task-number: QT3DS-3144 Change-Id: Ia1b5c5244ae89bcc57ccd946fbb007beb40a8975 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Action/ActionView.cpp')
-rw-r--r--src/Authoring/Studio/Palettes/Action/ActionView.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Authoring/Studio/Palettes/Action/ActionView.cpp b/src/Authoring/Studio/Palettes/Action/ActionView.cpp
index 3aa64112..92a532f2 100644
--- a/src/Authoring/Studio/Palettes/Action/ActionView.cpp
+++ b/src/Authoring/Studio/Palettes/Action/ActionView.cpp
@@ -1109,6 +1109,8 @@ void ActionView::initialize()
rootContext()->setContextProperty(QStringLiteral("_resDir"), StudioUtils::resourceImageUrl());
rootContext()->setContextProperty(QStringLiteral("_tabOrderHandler"), tabOrderHandler());
rootContext()->setContextProperty(QStringLiteral("_mouseHelper"), &m_mouseHelper);
+ m_mouseHelper.setWidget(this);
+
QString shiftKey(QStringLiteral("Shift+"));
#ifdef Q_OS_MACOS
shiftKey = "⇧";