diff options
author | Ghostkeeper <rubend@tutanota.com> | 2017-02-16 15:23:20 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2017-02-16 15:23:20 +0300 |
commit | abf092512a039ad62839e14df5bebb8b0aa0ba80 (patch) | |
tree | ed43c053e115162b7a76dee29e11011874ff8623 /cura/PrinterOutputDevice.py | |
parent | 140d5204c3298022202337897e0055070d4975d3 (diff) |
Don't show temperature if print core is removed in UM3
The empty string as hotend ID is interpreted as there being no hotend, since this is what the UM3 returns in that case.
Contributes to issue CURA-3161.
Diffstat (limited to 'cura/PrinterOutputDevice.py')
-rw-r--r-- | cura/PrinterOutputDevice.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 21f03a11ea..7f0b7c4c07 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -418,10 +418,14 @@ class PrinterOutputDevice(QObject, OutputDevice): # /param index Index of the extruder # /param hotend_id id of the hotend def _setHotendId(self, index, hotend_id): - if hotend_id and hotend_id != "" and hotend_id != self._hotend_ids[index]: + if hotend_id and hotend_id != self._hotend_ids[index]: Logger.log("d", "Setting hotend id of hotend %d to %s" % (index, hotend_id)) self._hotend_ids[index] = hotend_id self.hotendIdChanged.emit(index, hotend_id) + elif not hotend_id: + Logger.log("d", "Removing hotend id of hotend %d.", index) + self._hotend_ids[index] = None + self.hotendIdChanged.emit(index, None) ## Let the user decide if the hotends and/or material should be synced with the printer # NB: the UX needs to be implemented by the plugin |