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.
This commit is contained in:
Ghostkeeper 2017-02-16 13:23:20 +01:00
parent 140d5204c3
commit abf092512a
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75
2 changed files with 6 additions and 2 deletions

View file

@ -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