Rename setSelectionExtruder to setExtruderForSelection

This matches more closely with the naming of the other selection
actions.
This commit is contained in:
Arjen Hiemstra 2017-04-24 13:12:00 +02:00
parent e571b8aeac
commit 78603bed63
2 changed files with 5 additions and 2 deletions

View File

@ -75,8 +75,11 @@ class CuraActions(QObject):
op.addOperation(RemoveSceneNodeOperation(group_node)) op.addOperation(RemoveSceneNodeOperation(group_node))
op.push() op.push()
## Set the extruder that should be used to print the selection.
#
# \param extruder_id The ID of the extruder stack to use for the selected objects.
@pyqtSlot(str) @pyqtSlot(str)
def setSelectionExtruder(self, extruder_id: str) -> None: def setExtruderForSelection(self, extruder_id: str) -> None:
operation = GroupedOperation() operation = GroupedOperation()
for node in Selection.getAllSelectedObjects(): for node in Selection.getAllSelectedObjects():
if node.callDecoration("getActiveExtruder") == extruder_id: if node.callDecoration("getActiveExtruder") == extruder_id:

View File

@ -32,7 +32,7 @@ Menu
enabled: UM.Selection.hasSelection enabled: UM.Selection.hasSelection
checkable: true checkable: true
checked: ExtruderManager.selectedObjectExtruders.indexOf(model.id) != -1 checked: ExtruderManager.selectedObjectExtruders.indexOf(model.id) != -1
onTriggered: CuraActions.setSelectionExtruder(model.id) onTriggered: CuraActions.setExtruderForSelection(model.id)
shortcut: "Ctrl+" + (model.index + 1) shortcut: "Ctrl+" + (model.index + 1)
} }
onObjectAdded: base.insertItem(base.findItemIndex(extruderHeader) + index, object) onObjectAdded: base.insertItem(base.findItemIndex(extruderHeader) + index, object)