mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-01 23:01:10 -07:00
Qt5->Qt6: Fix another stack-overflow error for newer Python/Qt.
part of CURA-8591
This commit is contained in:
parent
9d7b1e49ee
commit
97da0b9183
2 changed files with 5 additions and 7 deletions
|
|
@ -34,12 +34,13 @@ class CuraAPI(QObject):
|
|||
raise RuntimeError("Tried to create singleton '{class_name}' more than once.".format(class_name = CuraAPI.__name__))
|
||||
if application is None:
|
||||
raise RuntimeError("Upon first time creation, the application must be set.")
|
||||
cls.__instance = super(CuraAPI, cls).__new__(cls)
|
||||
instance = super(CuraAPI, cls).__new__(cls)
|
||||
cls._application = application
|
||||
return cls.__instance
|
||||
return instance
|
||||
|
||||
def __init__(self, application: Optional["CuraApplication"] = None) -> None:
|
||||
super().__init__(parent = CuraAPI._application)
|
||||
CuraAPI.__instance = self
|
||||
|
||||
self._account = Account(self._application)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue