Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'cura/CuraActions.py')
-rw-r--r--cura/CuraActions.py27
1 files changed, 17 insertions, 10 deletions
diff --git a/cura/CuraActions.py b/cura/CuraActions.py
index 20c44c7916..d6e5add912 100644
--- a/cura/CuraActions.py
+++ b/cura/CuraActions.py
@@ -40,12 +40,13 @@ class CuraActions(QObject):
@pyqtSlot()
def openBugReportPage(self) -> None:
- event = CallFunctionEvent(self._openUrl, [QUrl("https://github.com/Ultimaker/Cura/issues")], {})
+ event = CallFunctionEvent(self._openUrl, [QUrl("https://github.com/Ultimaker/Cura/issues/new/choose")], {})
cura.CuraApplication.CuraApplication.getInstance().functionEvent(event)
- ## Reset camera position and direction to default
@pyqtSlot()
def homeCamera(self) -> None:
+ """Reset camera position and direction to default"""
+
scene = cura.CuraApplication.CuraApplication.getInstance().getController().getScene()
camera = scene.getActiveCamera()
if camera:
@@ -54,9 +55,10 @@ class CuraActions(QObject):
camera.setPerspective(True)
camera.lookAt(Vector(0, 0, 0))
- ## Center all objects in the selection
@pyqtSlot()
def centerSelection(self) -> None:
+ """Center all objects in the selection"""
+
operation = GroupedOperation()
for node in Selection.getAllSelectedObjects():
current_node = node
@@ -73,18 +75,21 @@ class CuraActions(QObject):
operation.addOperation(center_operation)
operation.push()
- ## Multiply all objects in the selection
- #
- # \param count The number of times to multiply the selection.
@pyqtSlot(int)
def multiplySelection(self, count: int) -> None:
+ """Multiply all objects in the selection
+
+ :param count: The number of times to multiply the selection.
+ """
+
min_offset = cura.CuraApplication.CuraApplication.getInstance().getBuildVolume().getEdgeDisallowedSize() + 2 # Allow for some rounding errors
job = MultiplyObjectsJob(Selection.getAllSelectedObjects(), count, min_offset = max(min_offset, 8))
job.start()
- ## Delete all selected objects.
@pyqtSlot()
def deleteSelection(self) -> None:
+ """Delete all selected objects."""
+
if not cura.CuraApplication.CuraApplication.getInstance().getController().getToolsEnabled():
return
@@ -106,11 +111,13 @@ class CuraActions(QObject):
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)
def setExtruderForSelection(self, extruder_id: str) -> None:
+ """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.
+ """
+
operation = GroupedOperation()
nodes_to_change = []