mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix check for existence of gcode_dict variable
getattr raises an error if it doesn't exist. It doesn't make the variable None or anything.
This commit is contained in:
parent
a6676fb477
commit
304c23b87e
1 changed files with 2 additions and 2 deletions
|
@ -66,9 +66,9 @@ class GCodeWriter(MeshWriter):
|
||||||
|
|
||||||
active_build_plate = Application.getInstance().getMultiBuildPlateModel().activeBuildPlate
|
active_build_plate = Application.getInstance().getMultiBuildPlateModel().activeBuildPlate
|
||||||
scene = Application.getInstance().getController().getScene()
|
scene = Application.getInstance().getController().getScene()
|
||||||
gcode_dict = getattr(scene, "gcode_dict")
|
if not hasattr(scene, "gcode_dict"):
|
||||||
if not gcode_dict:
|
|
||||||
return False
|
return False
|
||||||
|
gcode_dict = getattr(scene, "gcode_dict")
|
||||||
gcode_list = gcode_dict.get(active_build_plate, None)
|
gcode_list = gcode_dict.get(active_build_plate, None)
|
||||||
if gcode_list is not None:
|
if gcode_list is not None:
|
||||||
has_settings = False
|
has_settings = False
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue