mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 21:59:37 +08:00
Use only CuraApplication
It was complaining that getMachineManager doesn't exist, because that is in CuraApplication instead of UM.Application. I removed all references to UM.Application so that the imports are a bit simpler. Contributes to issue CURA-5330.
This commit is contained in:
parent
b309e93767
commit
01a645e726
@ -1,7 +1,6 @@
|
||||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from UM.Application import Application
|
||||
from UM.FileHandler.FileHandler import FileHandler #For typing.
|
||||
from UM.Logger import Logger
|
||||
from UM.Scene.SceneNode import SceneNode #For typing.
|
||||
@ -42,7 +41,7 @@ class NetworkedPrinterOutputDevice(PrinterOutputDevice):
|
||||
self._api_prefix = ""
|
||||
self._address = address
|
||||
self._properties = properties
|
||||
self._user_agent = "%s/%s " % (Application.getInstance().getApplicationName(), Application.getInstance().getVersion())
|
||||
self._user_agent = "%s/%s " % (CuraApplication.getInstance().getApplicationName(), CuraApplication.getInstance().getVersion())
|
||||
|
||||
self._onFinishedCallbacks = {} # type: Dict[str, Callable[[QNetworkReply], None]]
|
||||
self._authentication_state = AuthState.NotAuthenticated
|
||||
@ -261,7 +260,7 @@ class NetworkedPrinterOutputDevice(PrinterOutputDevice):
|
||||
self._manager.authenticationRequired.connect(self._onAuthenticationRequired)
|
||||
|
||||
if self._properties.get(b"temporary", b"false") != b"true":
|
||||
Application.getInstance().getMachineManager().checkCorrectGroupName(self.getId(), self.name)
|
||||
CuraApplication.getInstance().getMachineManager().checkCorrectGroupName(self.getId(), self.name)
|
||||
|
||||
def _registerOnFinishedCallback(self, reply: QNetworkReply, on_finished: Optional[Callable[[QNetworkReply], None]]) -> None:
|
||||
if on_finished is not None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user