aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/qml/qmlpuppet/qml2puppet/instances
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2020-06-26 17:49:28 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2020-06-29 10:19:45 +0000
commit85bcae2c38bbaefa571d29deb8c3122fa3aea788 (patch)
treeb9f12e62ac858b88d87005b09fe7adf464ce0420 /share/qtcreator/qml/qmlpuppet/qml2puppet/instances
parentba942583b8d33a09807fb7496cadcf92b726839d (diff)
QmlDesigner: Handle active scene id change properly on edit 3D view
The scene id shown on the corner of edit 3D view is updated and toolstates are also stored under the new id. Change-Id: Ib3ac2f2bb829a5d908e22932c313c76bd4143592 Fixes: QDS-2277 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/qml2puppet/instances')
-rw-r--r--share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp
index abed28978ee..2a2c7fce8fa 100644
--- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp
+++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp
@@ -1253,12 +1253,26 @@ void Qt5InformationNodeInstanceServer::changeIds(const ChangeIdsCommand &command
{
Qt5NodeInstanceServer::changeIds(command);
+#ifdef QUICK3D_MODULE
+ ServerNodeInstance sceneInstance = active3DSceneInstance();
if (m_active3DSceneUpdatePending) {
- ServerNodeInstance sceneInstance = active3DSceneInstance();
const QString sceneId = sceneInstance.id();
if (!sceneId.isEmpty())
updateActiveSceneToEditView3D();
+ } else {
+ qint32 sceneInstanceId = sceneInstance.instanceId();
+ const QVector<IdContainer> ids = command.ids();
+ for (const auto &id : ids) {
+ if (sceneInstanceId == id.instanceId()) {
+ QMetaObject::invokeMethod(m_editView3DRootItem, "handleActiveSceneIdChange",
+ Qt::QueuedConnection,
+ Q_ARG(QVariant, QVariant(sceneInstance.id())));
+ render3DEditView();
+ break;
+ }
+ }
}
+#endif
}
void Qt5InformationNodeInstanceServer::changeState(const ChangeStateCommand &command)