summaryrefslogtreecommitdiffstats
path: root/src/Authoring
diff options
context:
space:
mode:
authorKaj Grönholm <kaj.gronholm@qt.io>2020-06-01 17:08:49 +0300
committerKaj Grönholm <kaj.gronholm@qt.io>2020-06-29 12:07:32 +0300
commitd9b34b28839c6749c87416caf4944464dc9d716d (patch)
tree4a3eac86f0df231298e9b19f071f636b8c4dd77c /src/Authoring
parentc08ef9bc1772d98f675a5a51b3105af123b187cd (diff)
Fix and enable axis helper
Don't build the whole node tree into axis helper widget, but make sure its childred are updated. This fixes freezing when switching between presentations and adding more layers into presentation. Also enable axis helper again. Task-number: QT3DS-4122 Task-number: QT3DS-4117 Task-number: QT3DS-4124 Change-Id: Ie2727b15b30409035295517456012ddebe6f4b82 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring')
-rw-r--r--src/Authoring/Client/Code/Core/Utility/StudioPreferences.cpp5
-rw-r--r--src/Authoring/Qt3DStudio/MainFrm.cpp4
-rw-r--r--src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.cpp3
3 files changed, 3 insertions, 9 deletions
diff --git a/src/Authoring/Client/Code/Core/Utility/StudioPreferences.cpp b/src/Authoring/Client/Code/Core/Utility/StudioPreferences.cpp
index f4157e7c..c340ff32 100644
--- a/src/Authoring/Client/Code/Core/Utility/StudioPreferences.cpp
+++ b/src/Authoring/Client/Code/Core/Utility/StudioPreferences.cpp
@@ -452,10 +452,7 @@ void CStudioPreferences::setHelperGridOn(bool showGrid)
bool CStudioPreferences::isAxisHelperOn()
{
- return false;
- // Disable axis helper (QT3DS-4122). To be re-enabled (QT3DS-4124), thoroughly tested
- // and bugs fixed after 2.7 is released.
- //return s_preferences.value(QStringLiteral("VisualAids/ShowAxisHelper"), true).toBool();
+ return s_preferences.value(QStringLiteral("VisualAids/ShowAxisHelper"), true).toBool();
}
void CStudioPreferences::setAxisHelperOn(bool showAxisHelper)
diff --git a/src/Authoring/Qt3DStudio/MainFrm.cpp b/src/Authoring/Qt3DStudio/MainFrm.cpp
index 377260c1..8a868d23 100644
--- a/src/Authoring/Qt3DStudio/MainFrm.cpp
+++ b/src/Authoring/Qt3DStudio/MainFrm.cpp
@@ -252,10 +252,6 @@ CMainFrame::CMainFrame()
m_ui->actionToggle_hide_unhide_unselected->setVisible(false);
m_ui->actionFind->setVisible(false);
- // Hide axis helper (QT3DS-4122). To be re-enabled (QT3DS-4124), thoroughly tested and bugs
- // fixed after 2.7 is released.
- m_ui->actionAxis_Helper->setVisible(false);
-
// TODO: better solution?
m_updateUITimer->start(500);
connect(m_updateUITimer.data(), &QTimer::timeout, [&]() {
diff --git a/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.cpp b/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.cpp
index 590439f3..dcbcc83e 100644
--- a/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.cpp
+++ b/src/Authoring/Qt3DStudio/Render/StudioRendererTranslation.cpp
@@ -2133,12 +2133,13 @@ void STranslation::BuildRenderGraph(SGraphObjectTranslator &inParent, bool scene
m_AxisCamera.m_Id = m_Context.GetStringTable().RegisterStr("AxisCamera");
}
theParentTranslator.AppendChild(m_AxisHelperLayerTranslator->GetGraphObject());
- BuildRenderGraph(*m_AxisHelperLayerTranslator, scenePreviewPass);
SLayer &layer = static_cast<SLayer &>(m_AxisHelperLayerTranslator->GetGraphObject());
layer.m_NextSibling = layer.m_PreviousSibling = nullptr;
m_AxisHelperLayerTranslator->SetActive(true);
m_AxisHelperLayerTranslator->AppendChild(m_AxisCamera);
m_AxisCamera.m_Flags.SetActive(true);
+ // Make sure axis helper layer children gets updated
+ m_Context.GetRenderer().ChildrenUpdated(layer);
}
if (m_EditCameraEnabled && !scenePreviewPass) {