mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Show a message when trying to print via USB while already printing
Otherwise the button does nothing and gives no feedback of why it does nothing. Fixes #6026.
This commit is contained in:
parent
f334fa8578
commit
cc9609738c
1 changed files with 3 additions and 0 deletions
|
@ -6,6 +6,7 @@ import os
|
|||
from UM.i18n import i18nCatalog
|
||||
from UM.Logger import Logger
|
||||
from UM.Mesh.MeshWriter import MeshWriter #To get the g-code output.
|
||||
from UM.Message import Message #Show an error when already printing.
|
||||
from UM.PluginRegistry import PluginRegistry #To get the g-code output.
|
||||
from UM.Qt.Duration import DurationFormat
|
||||
|
||||
|
@ -118,6 +119,8 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
|||
# \param kwargs Keyword arguments.
|
||||
def requestWrite(self, nodes, file_name: str = None, filter_by_machine = False, file_handler = None, **kwargs):
|
||||
if self._is_printing:
|
||||
message = Message(text = catalog.i18nc("@message", "A print is still in progress. Cura cannot start another print via USB until the previous print has completed."), title = catalog.i18nc("@message", "Print in Progress"))
|
||||
message.show()
|
||||
return # Already printing
|
||||
self.writeStarted.emit(self)
|
||||
# cancel any ongoing preheat timer before starting a print
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue