mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 05:39:37 +08:00
Fix typing
CURA-6483
This commit is contained in:
parent
372e9026e4
commit
9868dee474
@ -12,6 +12,7 @@ from UM.OutputDevice.OutputDeviceManager import ManualDeviceAdditionAttempt
|
|||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from PyQt5.QtCore import QObject
|
from PyQt5.QtCore import QObject
|
||||||
|
from UM.OutputDevice.OutputDevicePlugin import OutputDevicePlugin
|
||||||
from cura.CuraApplication import CuraApplication
|
from cura.CuraApplication import CuraApplication
|
||||||
from cura.PrinterOutput.NetworkedPrinterOutputDevice import NetworkedPrinterOutputDevice
|
from cura.PrinterOutput.NetworkedPrinterOutputDevice import NetworkedPrinterOutputDevice
|
||||||
|
|
||||||
@ -105,7 +106,7 @@ class DiscoveredPrintersModel(QObject):
|
|||||||
self._application = application
|
self._application = application
|
||||||
self._discovered_printer_by_ip_dict = dict() # type: Dict[str, DiscoveredPrinter]
|
self._discovered_printer_by_ip_dict = dict() # type: Dict[str, DiscoveredPrinter]
|
||||||
|
|
||||||
self._plugin_for_manual_device = None
|
self._plugin_for_manual_device = None # type: Optional[OutputDevicePlugin]
|
||||||
self._manual_device_address = ""
|
self._manual_device_address = ""
|
||||||
|
|
||||||
discoveredPrintersChanged = pyqtSignal()
|
discoveredPrintersChanged = pyqtSignal()
|
||||||
@ -141,6 +142,7 @@ class DiscoveredPrintersModel(QObject):
|
|||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def cancelCurrentManualDeviceRequest(self) -> None:
|
def cancelCurrentManualDeviceRequest(self) -> None:
|
||||||
if self._manual_device_address:
|
if self._manual_device_address:
|
||||||
|
if self._plugin_for_manual_device is not None:
|
||||||
self._plugin_for_manual_device.removeManualDevice(self._manual_device_address, address = self._manual_device_address)
|
self._plugin_for_manual_device.removeManualDevice(self._manual_device_address, address = self._manual_device_address)
|
||||||
self._manual_device_address = ""
|
self._manual_device_address = ""
|
||||||
self._plugin_for_manual_device = None
|
self._plugin_for_manual_device = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user