mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-26 20:31:35 -07:00
Move getting preference out of for loop
This commit is contained in:
parent
fb8f735566
commit
6b0045265c
1 changed files with 3 additions and 1 deletions
|
|
@ -1627,6 +1627,8 @@ class CuraApplication(QtApplication):
|
||||||
default_extruder_position = self.getMachineManager().defaultExtruderPosition
|
default_extruder_position = self.getMachineManager().defaultExtruderPosition
|
||||||
default_extruder_id = self._global_container_stack.extruders[default_extruder_position].getId()
|
default_extruder_id = self._global_container_stack.extruders[default_extruder_position].getId()
|
||||||
|
|
||||||
|
select_models_on_load = Preferences.getInstance().getValue("cura/select_models_on_load")
|
||||||
|
|
||||||
for original_node in nodes:
|
for original_node in nodes:
|
||||||
|
|
||||||
# Create a CuraSceneNode just if the original node is not that type
|
# Create a CuraSceneNode just if the original node is not that type
|
||||||
|
|
@ -1700,7 +1702,7 @@ class CuraApplication(QtApplication):
|
||||||
node.callDecoration("setActiveExtruder", default_extruder_id)
|
node.callDecoration("setActiveExtruder", default_extruder_id)
|
||||||
scene.sceneChanged.emit(node)
|
scene.sceneChanged.emit(node)
|
||||||
|
|
||||||
if Preferences.getInstance().getValue("cura/select_models_on_load"):
|
if select_models_on_load:
|
||||||
Selection.add(node)
|
Selection.add(node)
|
||||||
|
|
||||||
self.fileCompleted.emit(filename)
|
self.fileCompleted.emit(filename)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue