aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorMahmoud Badri <mahmoud.badri@qt.io>2022-05-25 21:42:15 +0300
committerMahmoud Badri <mahmoud.badri@qt.io>2022-05-27 11:20:48 +0000
commit0b51afe21d6aa72b4b9faafc14f759d77f428e32 (patch)
treef2c7f0bde07a66ce7dca11d8c7a8f94ecfa8ea3e /share
parente2f20ddcd5f515d39d1eb5ae0d13b766ddfa73b6 (diff)
QmlDesigner: Implement "duplicate material" feature
Fixes: QDS-7013 Change-Id: I28a11dbd9d6586631c0edcf8003e551917eaac98 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml8
1 files changed, 7 insertions, 1 deletions
diff --git a/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml b/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml
index 77eedc67de1..ab061e4289c 100644
--- a/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml
+++ b/share/qtcreator/qmldesigner/materialBrowserQmlSource/MaterialBrowser.qml
@@ -103,6 +103,12 @@ Item {
}
StudioControls.MenuItem {
+ text: qsTr("Duplicate")
+ enabled: currentMaterial
+ onTriggered: materialBrowserModel.duplicateMaterial(currentMaterialIdx)
+ }
+
+ StudioControls.MenuItem {
text: qsTr("Rename")
enabled: currentMaterial
onTriggered: {
@@ -116,7 +122,7 @@ Item {
text: qsTr("Delete")
enabled: currentMaterial
- onTriggered: materialBrowserModel.deleteMaterial(currentMaterial.materialInternalId)
+ onTriggered: materialBrowserModel.deleteMaterial(currentMaterialIdx)
}
StudioControls.MenuSeparator {}