This commit is contained in:
Tim Kuipers 2015-07-28 15:20:22 +02:00
commit 2c010da555
6 changed files with 69 additions and 6 deletions

View file

@ -19,6 +19,8 @@ Item {
property alias centerObject: centerObjectAction;
property alias groupObjects: groupObjectsAction;
property alias unGroupObjects:unGroupObjectsAction;
property alias mergeObjects: mergeObjectsAction;
//property alias unMergeObjects: unMergeObjectsAction;
property alias multiplyObject: multiplyObjectAction;
property alias splitObject: splitObjectAction;
@ -139,6 +141,13 @@ Item {
enabled: UM.Scene.isGroupSelected
}
Action
{
id: mergeObjectsAction
text: qsTr("Merge objects");
enabled: UM.Scene.numObjectsSelected > 1 ? true: false
}
Action {
id: multiplyObjectAction;
//: Duplicate object action

View file

@ -357,6 +357,11 @@ UM.MainWindow {
{
Printer.ungroupSelected()
}
mergeObjects.onTriggered:
{
Printer.mergeSelected()
}
deleteAll.onTriggered: Printer.deleteAll()
resetAllTranslation.onTriggered: Printer.resetAllTranslation()
@ -378,27 +383,30 @@ UM.MainWindow {
id: objectContextMenu;
property variant objectId: -1;
MenuItem { action: actions.centerObject; }
MenuItem { action: actions.deleteObject; }
MenuItem { action: actions.multiplyObject; }
MenuItem { action: actions.splitObject; }
MenuItem { action: actions.groupObjects;}
MenuItem { action: actions.unGroupObjects;}
MenuSeparator { }
MenuItem { action: actions.deleteAll; }
MenuItem { action: actions.reloadAll; }
MenuItem { action: actions.resetAllTranslation; }
MenuItem { action: actions.resetAll; }
MenuItem { action: actions.groupObjects;}
MenuItem { action: actions.unGroupObjects;}
MenuItem { action: actions.mergeObjects;}
}
Menu {
id: contextMenu;
MenuItem { action: actions.deleteAll; }
MenuItem { action: actions.reloadAll; }
MenuItem { action: actions.resetAllTranslation; }
MenuItem { action: actions.resetAll; }
MenuItem { action: actions.groupObjects;}
MenuItem { action: actions.unGroupObjects;}
MenuItem { action: actions.mergeObjects;}
}
Connections {