mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Cleanup usb printer output device manager qml component creation - CURA-4568
This commit is contained in:
parent
055e4792b0
commit
1d68bcc218
1 changed files with 2 additions and 3 deletions
|
@ -16,13 +16,11 @@ from cura.CuraApplication import CuraApplication
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
import platform
|
import platform
|
||||||
import glob
|
|
||||||
import time
|
import time
|
||||||
import os.path
|
import os.path
|
||||||
import serial.tools.list_ports
|
import serial.tools.list_ports
|
||||||
from UM.Extension import Extension
|
from UM.Extension import Extension
|
||||||
|
|
||||||
from PyQt5.QtQml import QQmlComponent, QQmlContext
|
|
||||||
from PyQt5.QtCore import QUrl, QObject, pyqtSlot, pyqtProperty, pyqtSignal, Qt
|
from PyQt5.QtCore import QUrl, QObject, pyqtSlot, pyqtProperty, pyqtSignal, Qt
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
i18n_catalog = i18nCatalog("cura")
|
i18n_catalog = i18nCatalog("cura")
|
||||||
|
@ -100,6 +98,7 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension):
|
||||||
def updateAllFirmware(self, file_name):
|
def updateAllFirmware(self, file_name):
|
||||||
if file_name.startswith("file://"):
|
if file_name.startswith("file://"):
|
||||||
file_name = QUrl(file_name).toLocalFile() # File dialogs prepend the path with file://, which we don't need / want
|
file_name = QUrl(file_name).toLocalFile() # File dialogs prepend the path with file://, which we don't need / want
|
||||||
|
|
||||||
if not self._usb_output_devices:
|
if not self._usb_output_devices:
|
||||||
Message(i18n_catalog.i18nc("@info", "Unable to update firmware because there are no printers connected."), title = i18n_catalog.i18nc("@info:title", "Warning")).show()
|
Message(i18n_catalog.i18nc("@info", "Unable to update firmware because there are no printers connected."), title = i18n_catalog.i18nc("@info:title", "Warning")).show()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue