summaryrefslogtreecommitdiffstats
path: root/src/Authoring
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2020-05-05 13:27:57 +0300
committerAntti Määttä <antti.maatta@qt.io>2020-05-05 14:01:17 +0300
commit0079c6e848f86e27c643c6670aa2b2e16bfdd6b3 (patch)
tree04a8fe16f6d1cb2999b8917dc4f43014d6e05708 /src/Authoring
parent3db28c596f1bd164af7511192b18cd77c2719c10 (diff)
Fix scene rendering when changing view mode
The viewport is not set to correct size when changing the view mode, because the recalculating of the size is done before setting the view mode. Move the viewmode setting before recalculating viewport. Task-number: QT3DS-4106 Change-Id: I7a7a24ee0bfe508d3df9390befdcffe64e748604 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring')
-rw-r--r--src/Authoring/Qt3DStudio/UI/SceneView.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Authoring/Qt3DStudio/UI/SceneView.cpp b/src/Authoring/Qt3DStudio/UI/SceneView.cpp
index 46b8ccac..653fcd9b 100644
--- a/src/Authoring/Qt3DStudio/UI/SceneView.cpp
+++ b/src/Authoring/Qt3DStudio/UI/SceneView.cpp
@@ -338,6 +338,10 @@ void CSceneView::setToolMode(long inMode)
*/
void CSceneView::onEditCameraChanged()
{
+ // Update the view mode accordingly
+ setViewMode(g_StudioApp.getRenderer().GetEditCamera() >= 0 ? CPlayerContainerWnd::VIEW_EDIT
+ : CPlayerContainerWnd::VIEW_SCENE);
+
// Reset any scrolling and recalculate the window position.
if (m_playerContainerWnd) {
m_playerContainerWnd->SetScrollRanges();
@@ -345,9 +349,6 @@ void CSceneView::onEditCameraChanged()
setPlayerWndPosition();
}
- // Update the view mode accordingly
- setViewMode(g_StudioApp.getRenderer().GetEditCamera() >= 0 ? CPlayerContainerWnd::VIEW_EDIT
- : CPlayerContainerWnd::VIEW_SCENE);
m_playerWnd->update();
}