mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 04:59:00 +08: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
@ -66,9 +66,9 @@ class GCodeWriter(MeshWriter):
|
||||
|
||||
active_build_plate = Application.getInstance().getMultiBuildPlateModel().activeBuildPlate
|
||||
scene = Application.getInstance().getController().getScene()
|
||||
gcode_dict = getattr(scene, "gcode_dict")
|
||||
if not gcode_dict:
|
||||
if not hasattr(scene, "gcode_dict"):
|
||||
return False
|
||||
gcode_dict = getattr(scene, "gcode_dict")
|
||||
gcode_list = gcode_dict.get(active_build_plate, None)
|
||||
if gcode_list is not None:
|
||||
has_settings = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user