mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 01:37:51 -06:00
Fixed some imports for USB printing
This commit is contained in:
parent
f8a9fa1a66
commit
33313ddb70
1 changed files with 2 additions and 4 deletions
|
@ -8,14 +8,12 @@ import time
|
||||||
import queue
|
import queue
|
||||||
import re
|
import re
|
||||||
import functools
|
import functools
|
||||||
import os.path
|
|
||||||
|
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
from UM.PluginRegistry import PluginRegistry
|
|
||||||
from cura.PrinterOutputDevice import PrinterOutputDevice, ConnectionState
|
from cura.PrinterOutputDevice import PrinterOutputDevice, ConnectionState
|
||||||
|
from UM.Message import Message
|
||||||
|
|
||||||
from PyQt5.QtQml import QQmlComponent, QQmlContext
|
|
||||||
from PyQt5.QtCore import QUrl, pyqtSlot, pyqtSignal
|
from PyQt5.QtCore import QUrl, pyqtSlot, pyqtSignal
|
||||||
|
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
|
@ -137,7 +135,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
||||||
# \param gcode_list List with gcode (strings).
|
# \param gcode_list List with gcode (strings).
|
||||||
def printGCode(self, gcode_list):
|
def printGCode(self, gcode_list):
|
||||||
if self._progress or self._connection_state != ConnectionState.connected:
|
if self._progress or self._connection_state != ConnectionState.connected:
|
||||||
self._error_message = Message(i18n_catalog.i18nc("@info:status", "Printer is busy or not connected. Unable to start a new job."))
|
self._error_message = Message(catalog.i18nc("@info:status", "Printer is busy or not connected. Unable to start a new job."))
|
||||||
self._error_message.show()
|
self._error_message.show()
|
||||||
Logger.log("d", "Printer is busy or not connected, aborting print")
|
Logger.log("d", "Printer is busy or not connected, aborting print")
|
||||||
self.writeError.emit(self)
|
self.writeError.emit(self)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue