This commit is contained in:
Ian Paschal 2019-04-08 13:45:21 +02:00
commit 1ef98d029d
3 changed files with 16 additions and 5 deletions

View File

@ -371,10 +371,17 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
self._sendCommand("N%d%s*%d" % (self._gcode_position, line, checksum))
progress = (self._gcode_position / len(self._gcode))
print_job = self._printers[0].activePrintJob
try:
progress = self._gcode_position / len(self._gcode)
except ZeroDivisionError:
# There is nothing to send!
if print_job is not None:
print_job.updateState("error")
return
elapsed_time = int(time() - self._print_start_time)
print_job = self._printers[0].activePrintJob
if print_job is None:
controller = GenericOutputController(self)
controller.setCanUpdateFirmware(True)

View File

@ -25,12 +25,16 @@ Rectangle
Label
{
id: notificationLabel
anchors.centerIn: parent
anchors.fill: parent
color: UM.Theme.getColor("primary_text")
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("small")
font: UM.Theme.getFont("default")
renderType: Text.NativeRendering
// This is a bit of a hack, but we don't really have enough room for 2 characters (eg 9+). The default font
// does have a tad bit to much spacing. So instead of adding a whole new font, we just modify it a bit for this
// specific instance.
Component.onCompleted: font.letterSpacing = -1
}
}

View File

@ -604,7 +604,7 @@
"toolbox_action_button": [8.0, 2.5],
"toolbox_loader": [2.0, 2.0],
"notification_icon": [1.4, 1.4],
"notification_icon": [1.5, 1.5],
"avatar_image": [6.8, 6.8],