mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-22 06:03:57 -06:00
CURA-5218 Disable the Activate and Duplicate button in the management
page if the selected profile is not supported
This commit is contained in:
parent
626c424a02
commit
b8a26f3187
2 changed files with 4 additions and 4 deletions
|
@ -324,8 +324,8 @@ class MachineManager(QObject):
|
||||||
Logger.log("i", "Machine '%s' quality changes set to '%s'",
|
Logger.log("i", "Machine '%s' quality changes set to '%s'",
|
||||||
global_stack.getName(), new_quality_changes_group.name)
|
global_stack.getName(), new_quality_changes_group.name)
|
||||||
else:
|
else:
|
||||||
if quality_type in quality_groups:
|
new_quality_group = quality_groups.get(quality_type)
|
||||||
new_quality_group = quality_groups[quality_type]
|
if new_quality_group is not None:
|
||||||
self._setQualityGroup(new_quality_group, empty_quality_changes = True)
|
self._setQualityGroup(new_quality_group, empty_quality_changes = True)
|
||||||
same_quality_found = True
|
same_quality_found = True
|
||||||
Logger.log("i", "Machine '%s' quality set to '%s'",
|
Logger.log("i", "Machine '%s' quality set to '%s'",
|
||||||
|
|
|
@ -71,7 +71,7 @@ Item
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:button", "Activate")
|
text: catalog.i18nc("@action:button", "Activate")
|
||||||
iconName: "list-activate"
|
iconName: "list-activate"
|
||||||
enabled: !isCurrentItemActivated
|
enabled: !isCurrentItemActivated && base.currentItem.quality_group != undefined
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (base.currentItem.is_read_only) {
|
if (base.currentItem.is_read_only) {
|
||||||
Cura.MachineManager.setQualityGroup(base.currentItem.quality_group);
|
Cura.MachineManager.setQualityGroup(base.currentItem.quality_group);
|
||||||
|
@ -101,7 +101,7 @@ Item
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@label", "Duplicate")
|
text: catalog.i18nc("@label", "Duplicate")
|
||||||
iconName: "list-add"
|
iconName: "list-add"
|
||||||
enabled: !base.canCreateProfile
|
enabled: !base.canCreateProfile && base.currentItem.quality_group != undefined
|
||||||
visible: !base.canCreateProfile
|
visible: !base.canCreateProfile
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue