mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-22 14:13:55 -06:00
Added num user settings to save project dialog
This commit is contained in:
parent
4431241a51
commit
0e09de195b
2 changed files with 26 additions and 1 deletions
|
@ -412,6 +412,17 @@ class MachineManager(QObject):
|
|||
|
||||
return False
|
||||
|
||||
@pyqtProperty(int, notify = activeStackValueChanged)
|
||||
def numUserSettings(self):
|
||||
if not self._global_container_stack:
|
||||
return 0
|
||||
num_user_settings = 0
|
||||
num_user_settings += len(self._global_container_stack.getTop().findInstances())
|
||||
stacks = list(ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId()))
|
||||
for stack in stacks:
|
||||
num_user_settings += len(stack.getTop().findInstances())
|
||||
return num_user_settings
|
||||
|
||||
## Delete a user setting from the global stack and all extruder stacks.
|
||||
# \param key \type{str} the name of the key to delete
|
||||
@pyqtSlot(str)
|
||||
|
|
|
@ -119,7 +119,21 @@ UM.Dialog
|
|||
text: catalog.i18nc("@action:label", "Profile settings")
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "Not in profile")
|
||||
width: parent.width / 3
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@action:label", "%1 override(s)").arg(Cura.MachineManager.numUserSettings)
|
||||
width: parent.width / 3
|
||||
}
|
||||
visible: Cura.MachineManager.numUserSettings
|
||||
}
|
||||
Row
|
||||
{
|
||||
width: parent.width
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue