Show UnsupportedProfileIndication if list of quality types is empty

And otherwise show the intent and quality level selectors.

This is currently quite broken because the list of quality levels is not correct. It should only show a quality type if it is supported by all extruders.

Contributes to issue CURA-8849.
This commit is contained in:
Ghostkeeper 2022-06-14 18:20:00 +02:00
parent 5c15ac68b8
commit b18cb1f649
No known key found for this signature in database
GPG Key ID: D2A8871EE34EC59A
2 changed files with 14 additions and 2 deletions

View File

@ -1,5 +1,5 @@
// Copyright (c) 2018 Ultimaker B.V. //Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. //Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10 import QtQuick 2.10
@ -39,13 +39,23 @@ Item
RecommendedQualityProfileSelector RecommendedQualityProfileSelector
{ {
width: parent.width width: parent.width
visible: recommendedResolutionSelector.visible
} }
RecommendedResolutionSelector RecommendedResolutionSelector
{ {
id: recommendedResolutionSelector
width: parent.width width: parent.width
} }
UnsupportedProfileIndication
{
width: parent.width
visible: !recommendedResolutionSelector.visible
}
//Line between the sections. //Line between the sections.
Rectangle Rectangle
{ {

View File

@ -15,6 +15,8 @@ Item
property string _previousResolution: "" //Internal variable to detect changes. property string _previousResolution: "" //Internal variable to detect changes.
Component.onCompleted: _previousResolution = Cura.MachineManager.activeQualityType; Component.onCompleted: _previousResolution = Cura.MachineManager.activeQualityType;
visible: visibilityPreset.count > 0 //Only show if there are quality types to select from.
Cura.IconWithText Cura.IconWithText
{ {
id: resolutionTitle id: resolutionTitle