summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2018-05-25 15:25:09 +0300
committerTomi Korpipää <tomi.korpipaa@qt.io>2018-05-28 05:27:15 +0000
commitb3265ac43438827a33ac307372602f9887d483dc (patch)
tree3515ecc30474387c7c9d22c2ecfb7fedd39ff687
parentb1c6a6628cffc1a5a89bd9d82240020dac2dcbb9 (diff)
Remove redundant adds and removes from RearrangeObjects
According to the comment, the old timeline needed this redundancy, but the new timeline doesn't need it. Task-number: QT3DS-1722 Change-Id: I63c5bd2235f0e5e6516fafaf237d62ce69a77071 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r--src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
index a2c7255a..b7703bb4 100644
--- a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
+++ b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
@@ -2286,25 +2286,12 @@ public:
TInstanceHandle inDest,
DocumentEditorInsertType::Enum inInsertType) override
{
- // The operations here are carefully constructed to ensure the various views can handle the
- // messages.
- // The timeline, for instance, requires that before a create operation happens all remove
- // operations have happened.
qt3dsdm::TInstanceHandleList sortableList(ToGraphOrdering(inInstances));
- for (size_t idx = 0, end = sortableList.size(); idx < end; ++idx)
- qt3dsdm::Qt3DSDMInstanceHandle theInstance(sortableList[idx]);
-
- for (size_t idx = 0, end = sortableList.size(); idx < end; ++idx)
- m_AssetGraph.RemoveChild(sortableList[idx], false);
-
TInstanceHandle theParent(inDest);
if (inInsertType == DocumentEditorInsertType::PreviousSibling
|| inInsertType == DocumentEditorInsertType::NextSibling)
theParent = GetParent(inDest);
- for (size_t idx = 0, end = sortableList.size(); idx < end; ++idx)
- m_AssetGraph.AddChild(theParent, sortableList[idx]);
-
for (size_t idx = 0, end = sortableList.size(); idx < end; ++idx) {
qt3dsdm::Qt3DSDMInstanceHandle theInstance(sortableList[idx]);
// If the insert type is next sibling, we have to reverse the list