mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Pass application
This commit is contained in:
parent
3ad79a5888
commit
f4d0e39788
3 changed files with 19 additions and 14 deletions
|
@ -1,24 +1,26 @@
|
|||
# Copyright (c) 2019 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from typing import Optional
|
||||
from typing import Optional, TYPE_CHECKING
|
||||
|
||||
from PyQt5.QtCore import QObject, pyqtSlot
|
||||
|
||||
from UM.i18n import i18nCatalog
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from cura.CuraApplication import CuraApplication
|
||||
|
||||
|
||||
#
|
||||
# This manager provides (convenience) functions to the Machine Settings Dialog QML to update certain machine settings.
|
||||
#
|
||||
class MachineSettingsManager(QObject):
|
||||
|
||||
def __init__(self, parent: Optional["QObject"] = None) -> None:
|
||||
def __init__(self, application: "CuraApplication", parent: Optional["QObject"] = None) -> None:
|
||||
super().__init__(parent)
|
||||
self._i18n_catalog = i18nCatalog("cura")
|
||||
|
||||
from cura.CuraApplication import CuraApplication
|
||||
self._application = CuraApplication.getInstance()
|
||||
self._application = application
|
||||
|
||||
# Force rebuilding the build volume by reloading the global container stack. This is a bit of a hack, but it seems
|
||||
# quite enough.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue