mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 04:29:01 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
3b44fd1608
@ -585,18 +585,16 @@ class CuraApplication(QtApplication):
|
|||||||
node = Selection.getSelectedObject(0)
|
node = Selection.getSelectedObject(0)
|
||||||
|
|
||||||
if node:
|
if node:
|
||||||
|
current_node = node
|
||||||
|
# Find the topmost group
|
||||||
|
while current_node.getParent() and current_node.getParent().callDecoration("isGroup"):
|
||||||
|
current_node = current_node.getParent()
|
||||||
|
|
||||||
|
new_node = copy.deepcopy(current_node)
|
||||||
|
|
||||||
op = GroupedOperation()
|
op = GroupedOperation()
|
||||||
for _ in range(count):
|
for _ in range(count):
|
||||||
if node.getParent() and node.getParent().callDecoration("isGroup"):
|
op.addOperation(AddSceneNodeOperation(new_node, current_node.getParent()))
|
||||||
new_node = copy.deepcopy(node.getParent()) #Copy the group node.
|
|
||||||
new_node.callDecoration("recomputeConvexHull")
|
|
||||||
|
|
||||||
op.addOperation(AddSceneNodeOperation(new_node,node.getParent().getParent()))
|
|
||||||
else:
|
|
||||||
new_node = copy.deepcopy(node)
|
|
||||||
new_node.callDecoration("recomputeConvexHull")
|
|
||||||
op.addOperation(AddSceneNodeOperation(new_node, node.getParent()))
|
|
||||||
|
|
||||||
op.push()
|
op.push()
|
||||||
|
|
||||||
## Center object on platform.
|
## Center object on platform.
|
||||||
|
@ -81,6 +81,9 @@ class PrintInformation(QObject):
|
|||||||
|
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def setJobName(self, name):
|
def setJobName(self, name):
|
||||||
|
# Ensure that we don't use entire path but only filename
|
||||||
|
name = os.path.basename(name)
|
||||||
|
|
||||||
# when a file is opened using the terminal; the filename comes from _onFileLoaded and still contains its
|
# when a file is opened using the terminal; the filename comes from _onFileLoaded and still contains its
|
||||||
# extension. This cuts the extension off if necessary.
|
# extension. This cuts the extension off if necessary.
|
||||||
name = os.path.splitext(name)[0]
|
name = os.path.splitext(name)[0]
|
||||||
|
@ -126,6 +126,9 @@ class MachineManager(QObject):
|
|||||||
self._auto_change_material_hotend_flood_time = time.time()
|
self._auto_change_material_hotend_flood_time = time.time()
|
||||||
self._auto_change_material_hotend_flood_last_choice = button
|
self._auto_change_material_hotend_flood_last_choice = button
|
||||||
|
|
||||||
|
if button == QMessageBox.No:
|
||||||
|
return
|
||||||
|
|
||||||
Logger.log("d", "Setting hotend variant of hotend %d to %s" % (index, hotend_id))
|
Logger.log("d", "Setting hotend variant of hotend %d to %s" % (index, hotend_id))
|
||||||
|
|
||||||
extruder_manager = ExtruderManager.getInstance()
|
extruder_manager = ExtruderManager.getInstance()
|
||||||
@ -174,6 +177,9 @@ class MachineManager(QObject):
|
|||||||
self._auto_change_material_hotend_flood_time = time.time()
|
self._auto_change_material_hotend_flood_time = time.time()
|
||||||
self._auto_change_material_hotend_flood_last_choice = button
|
self._auto_change_material_hotend_flood_last_choice = button
|
||||||
|
|
||||||
|
if button == QMessageBox.No:
|
||||||
|
return
|
||||||
|
|
||||||
Logger.log("d", "Setting material of hotend %d to %s" % (index, material_id))
|
Logger.log("d", "Setting material of hotend %d to %s" % (index, material_id))
|
||||||
|
|
||||||
extruder_manager = ExtruderManager.getInstance()
|
extruder_manager = ExtruderManager.getInstance()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user