summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Client/Code/Core/Doc/Doc.cpp
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2018-05-04 10:11:44 +0300
committerTomi Korpipää <tomi.korpipaa@qt.io>2018-05-04 11:02:47 +0000
commite6e89d6a62deb11d51947e1ae3f391150db407cc (patch)
treebb82bec120ec96791beed2a36ae55f50927db100 /src/Authoring/Client/Code/Core/Doc/Doc.cpp
parent308dba44c93ded6ccf1ea3933056500193c12945 (diff)
Replace Ctrl+D duplicate with alias
Replace deep copy duplicate with alias duplicate. Task-number: QT3DS-1525 Change-Id: I98eeaf3003e2f6ebc6206b52a85ed8a44363dcd8 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Client/Code/Core/Doc/Doc.cpp')
-rw-r--r--src/Authoring/Client/Code/Core/Doc/Doc.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/Doc.cpp b/src/Authoring/Client/Code/Core/Doc/Doc.cpp
index b64ceea7..d947e4f1 100644
--- a/src/Authoring/Client/Code/Core/Doc/Doc.cpp
+++ b/src/Authoring/Client/Code/Core/Doc/Doc.cpp
@@ -1970,19 +1970,13 @@ bool CDoc::CanCut()
//==============================================================================
/**
* Handles the duplicate command passed by mainframe.
- * Makes a copy of the currently selected item (if there is one) and attaches
+ * Makes an alias copy of the currently selected item (if there is one) and attaches
* it to the same parent as the original.
*/
void CDoc::HandleDuplicateCommand()
{
- qt3dsdm::Qt3DSDMInstanceHandle theSelectedInstance = GetSelectedInstance();
-
- // If we have a valid object to duplicate
- if (m_StudioSystem->GetClientDataModelBridge()->IsDuplicateable(theSelectedInstance)) {
- using namespace Q3DStudio;
- SCOPED_DOCUMENT_EDITOR(*this, QObject::tr("Duplicate Object"))
- ->DuplicateInstance(GetSelectedInstance());
- }
+ Q3DStudio::SCOPED_DOCUMENT_EDITOR(*this, QObject::tr("Alias Duplicate"))
+ ->CreateAliasDuplicates(GetSelectedValue().GetSelectedInstances(), GetActiveSlide());
}
//=============================================================================