Introduce center and multiply actions that work on the entire selection

Instead of working on a single object.

Contributes to CURA-3609
This commit is contained in:
Arjen Hiemstra 2017-04-20 17:18:12 +02:00
parent 06cc0e9a63
commit dd73c53ece

View File

@ -18,6 +18,8 @@ Item
property alias redo: redoAction;
property alias deleteSelection: deleteSelectionAction;
property alias centerSelection: centerSelectionAction;
property alias multiplySelection: multiplySelectionAction;
property alias deleteObject: deleteObjectAction;
property alias centerObject: centerObjectAction;
@ -181,13 +183,29 @@ Item
Action
{
id: deleteSelectionAction;
text: catalog.i18nc("@action:inmenu menubar:edit","Delete &Selection");
enabled: UM.Controller.toolsEnabled;
text: catalog.i18ncp("@action:inmenu menubar:edit", "Delete &Selected Model", "Delete &Selected Models", UM.Selection.selectionCount);
enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection;
iconName: "edit-delete";
shortcut: StandardKey.Delete;
onTriggered: CuraApplication.deleteSelection();
}
Action
{
id: centerSelectionAction;
text: catalog.i18ncp("@action:inmenu menubar:edit", "Center Selected Model", "Center Selected Models", UM.Selection.selectionCount);
enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection;
iconName: "align-vertical-center";
}
Action
{
id: multiplySelectionAction;
text: catalog.i18ncp("@action:inmenu menubar:edit", "Multiply Selected Model", "Multiply Selected Models", UM.Selection.selectionCount);
enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection;
iconName: "edit-duplicate";
}
Action
{
id: deleteObjectAction;