summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Render/StudioRendererTranslation.cpp
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2018-03-19 09:50:18 +0200
committerTomi Korpipää <tomi.korpipaa@qt.io>2018-03-19 09:16:50 +0000
commitabb2cb96584f482441a2961caeb43b1469ce0d0c (patch)
tree10cf3ca85d2d84ad6ac4d75871c72c38a08c151e /src/Authoring/Studio/Render/StudioRendererTranslation.cpp
parent2b3819c8e3cde79f5b31b042bcd1fc69e84527a2 (diff)
Allow deselecting by clicking an empty spot in scene view
Task-number: QT3DS-374 Change-Id: I0a53bc9e774e94f46a7549d3243115d5cdadc290 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Render/StudioRendererTranslation.cpp')
-rw-r--r--src/Authoring/Studio/Render/StudioRendererTranslation.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/Authoring/Studio/Render/StudioRendererTranslation.cpp b/src/Authoring/Studio/Render/StudioRendererTranslation.cpp
index 90c29b0d..a6600bf7 100644
--- a/src/Authoring/Studio/Render/StudioRendererTranslation.cpp
+++ b/src/Authoring/Studio/Render/StudioRendererTranslation.cpp
@@ -1976,7 +1976,6 @@ void STranslation::BuildRenderGraph(SGraphObjectTranslator &inParent,
void STranslation::DeactivateScan(SGraphObjectTranslator &inParent,
Qt3DSDMInstanceHandle inAliasHandle)
{
- SGraphObjectTranslator &theParentTranslator(inParent);
// Alias handles propagate down the scene graph.
if (inParent.GetInstanceHandle() != inParent.GetSceneGraphInstanceHandle())
inAliasHandle = inParent.GetInstanceHandle();
@@ -3090,8 +3089,7 @@ void STranslation::RotateSelectedInstanceAboutCameraDirectionVector(
}
// This method never feels right to me. It is difficult to apply it to a single axis (of course for
-// that
-// you can use the inspector palette).
+// that you can use the inspector palette).
void STranslation::RotateSelectedInstance(CPt inOriginalCoords, CPt inPreviousCoords,
CPt inMouseCoords, CUpdateableDocumentEditor &inEditor,
bool inLockToAxis)
@@ -3103,8 +3101,7 @@ void STranslation::RotateSelectedInstance(CPt inOriginalCoords, CPt inPreviousCo
if (theCamera == nullptr)
return;
// We want to do a similar translation to what we did below but we need to calculate the
- // parent's
- // global rotation without scale included.
+ // parent's global rotation without scale included.
QT3DSF32 theXDistance = (QT3DSF32)inMouseCoords.x - (QT3DSF32)inPreviousCoords.x;
QT3DSF32 theYDistance = (QT3DSF32)inMouseCoords.y - (QT3DSF32)inPreviousCoords.y;
@@ -3384,7 +3381,6 @@ void STranslation::PerformWidgetDrag(int inWidgetSubComponent, CPt inOriginalCoo
Option<QT3DSVec3> theOriginalPlaneCoords(thePrepResult->m_OriginalPlaneCoords);
Option<QT3DSVec3> theCurrentPlaneCoords(thePrepResult->m_CurrentPlaneCoords);
- Option<QT3DSVec3> thePreviousPlaneCoords(thePrepResult->m_PreviousPlaneCoords);
QT3DSVec3 globalPos(thePrepResult->m_GlobalPos);
bool isPlane(thePrepResult->m_IsPlane);
QT3DSVec3 theAxis(thePrepResult->m_Axis);
@@ -3477,10 +3473,8 @@ void STranslation::PerformWidgetDrag(int inWidgetSubComponent, CPt inOriginalCoo
ApplyRotationToSelectedInstance(theRotation, *theNode, inEditor, false);
}
// In this case we are viewing the plane of rotation pretty much dead on, so we need to
- // assume
- // the camera and the object are both in the plane of rotation. In this case we *sort* of
- // need to
- // do trackball rotation but force it to one plane of rotation.
+ // assume the camera and the object are both in the plane of rotation. In this case we
+ // *sort* of need to do trackball rotation but force it to one plane of rotation.
else {
// Setup a plane 600 units away from the camera and have the gadget run from there.