mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
No longer start print if it's already started
CL-541
This commit is contained in:
parent
aef54f99db
commit
e2845a224c
1 changed files with 6 additions and 2 deletions
|
@ -69,6 +69,11 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
|||
# is ignored.
|
||||
# \param kwargs Keyword arguments.
|
||||
def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None, **kwargs):
|
||||
if self._is_printing:
|
||||
return # Aleady printing
|
||||
|
||||
Application.getInstance().showPrintMonitor.emit(True)
|
||||
|
||||
gcode_list = getattr(Application.getInstance().getController().getScene(), "gcode_list")
|
||||
self._printGCode(gcode_list)
|
||||
|
||||
|
@ -93,7 +98,6 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
|||
|
||||
self.writeFinished.emit(self)
|
||||
|
||||
|
||||
def _autoDetectFinished(self, job):
|
||||
result = job.getResult()
|
||||
if result is not None:
|
||||
|
@ -210,7 +214,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
|||
elapsed_time = int(time() - self._print_start_time)
|
||||
print_job = self._printers[0].activePrintJob
|
||||
if print_job is None:
|
||||
print_job = PrintJobOutputModel(output_controller = None)
|
||||
print_job = PrintJobOutputModel(output_controller = None, name= Application.getInstance().getPrintInformation().jobName)
|
||||
self._printers[0].updateActivePrintJob(print_job)
|
||||
|
||||
print_job.updateTimeElapsed(elapsed_time)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue