Make sure that the preferred material name variable exists

Another small bug I found when looking through this MachineManager code. My IDE was complaining that the preferred_material_name was not always initialised and that preferred_material was an unused variable.

Doesn't contribute to issue CURA-3803.
This commit is contained in:
Ghostkeeper 2017-05-22 14:25:43 +02:00
parent cc3402ab81
commit bec43d5b9a
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -781,7 +781,7 @@ class MachineManager(QObject):
self.blurSettings.emit()
self._active_container_stack.variant = containers[0]
Logger.log("d", "Active variant changed to {active_variant_id}".format(active_variant_id = containers[0].getId()))
preferred_material = None
preferred_material_name = None
if old_material:
preferred_material_name = old_material.getName()