mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
CURA-4606 fix profiles page Active button
This commit is contained in:
parent
3ff9cb6b1e
commit
8efe13a55a
3 changed files with 15 additions and 6 deletions
|
|
@ -44,7 +44,10 @@ Item
|
|||
}
|
||||
|
||||
property var isCurrentItemActivated: {
|
||||
// TODO
|
||||
if (!base.currentItem) {
|
||||
return false;
|
||||
}
|
||||
return base.currentItem.name == Cura.MachineManager.activeQualityOrQualityChangesName;
|
||||
}
|
||||
|
||||
Row // Button Row
|
||||
|
|
@ -62,9 +65,13 @@ Item
|
|||
{
|
||||
text: catalog.i18nc("@action:button", "Activate")
|
||||
iconName: "list-activate"
|
||||
enabled: base.currentItem != null ? base.currentItem.name != Cura.MachineManager.activeQualityOrQualityChangesName : false;
|
||||
enabled: !isCurrentItemActivated
|
||||
onClicked: {
|
||||
// TODO
|
||||
if (base.currentItem.is_read_only) {
|
||||
Cura.MachineManager.setQualityGroup(base.currentItem.quality_group);
|
||||
} else {
|
||||
Cura.MachineManager.setQualityChangesGroup(base.currentItem.quality_changes_group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue