mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Add a method to get the id of the current user profile
CURA-1668
This commit is contained in:
parent
cc7369c594
commit
8608468802
1 changed files with 8 additions and 1 deletions
|
@ -205,6 +205,13 @@ class MachineManagerModel(QObject):
|
||||||
def isGlobalStackValid(self):
|
def isGlobalStackValid(self):
|
||||||
return self._global_stack_valid
|
return self._global_stack_valid
|
||||||
|
|
||||||
|
@pyqtProperty(str, notify = globalContainerChanged)
|
||||||
|
def activeUserProfileId(self):
|
||||||
|
if self._global_container_stack:
|
||||||
|
return self._global_container_stack.getTop().getId()
|
||||||
|
|
||||||
|
return ""
|
||||||
|
|
||||||
@pyqtProperty(str, notify = globalContainerChanged)
|
@pyqtProperty(str, notify = globalContainerChanged)
|
||||||
def activeMachineName(self):
|
def activeMachineName(self):
|
||||||
if self._global_container_stack:
|
if self._global_container_stack:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue