Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasper Lamboo <c.lamboo@ultimaker.com>2022-06-16 16:55:32 +0300
committerGitHub <noreply@github.com>2022-06-16 16:55:32 +0300
commit50a351149641bd435f81f09b22dbd57f723f6a34 (patch)
tree659b0d500a1234288869deb2972aacbb47c289f5
parent88168bc0e156b163edb797fc1a087d6bd9459432 (diff)
parent9dff733345170d81d9bfad6af0db2b893492c818 (diff)
Merge pull request #12542 from Ultimaker/CURA-8849_intent_selection_fixes
[CURA-8849] Intent selection fixes
-rw-r--r--cura/Machines/Models/ActiveIntentQualitiesModel.py2
-rw-r--r--resources/qml/PrintSetupSelector/Recommended/ProfileWarningReset.qml8
-rw-r--r--resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml13
-rw-r--r--resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml5
-rw-r--r--resources/qml/PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml5
5 files changed, 20 insertions, 13 deletions
diff --git a/cura/Machines/Models/ActiveIntentQualitiesModel.py b/cura/Machines/Models/ActiveIntentQualitiesModel.py
index 769f9410c5..2e13f7dbcb 100644
--- a/cura/Machines/Models/ActiveIntentQualitiesModel.py
+++ b/cura/Machines/Models/ActiveIntentQualitiesModel.py
@@ -36,6 +36,8 @@ class ActiveIntentQualitiesModel(ListModel):
IntentManager.intentCategoryChangedSignal.connect(self._update)
machine_manager = cura.CuraApplication.CuraApplication.getInstance().getMachineManager()
machine_manager.activeQualityGroupChanged.connect(self._update)
+ machine_manager.globalContainerChanged.connect(self._updateDelayed)
+ machine_manager.extruderChanged.connect(self._updateDelayed) # We also need to update if an extruder gets disabled
self._update_timer = QTimer()
self._update_timer.setInterval(100)
diff --git a/resources/qml/PrintSetupSelector/Recommended/ProfileWarningReset.qml b/resources/qml/PrintSetupSelector/Recommended/ProfileWarningReset.qml
index c9abcab1c8..1a54dc27db 100644
--- a/resources/qml/PrintSetupSelector/Recommended/ProfileWarningReset.qml
+++ b/resources/qml/PrintSetupSelector/Recommended/ProfileWarningReset.qml
@@ -3,13 +3,10 @@ import QtQuick 2.10
import UM 1.6 as UM
import Cura 1.6 as Cura
-Rectangle
+Item
{
height: visible ? UM.Theme.getSize("action_button_icon").height : 0
visible: Cura.SimpleModeSettingsManager.isProfileCustomized || Cura.MachineManager.hasCustomQuality
- anchors.topMargin: UM.Theme.getSize("default_margin")
- anchors.bottomMargin: UM.Theme.getSize("default_margin")
-
Rectangle
{
@@ -34,6 +31,7 @@ Rectangle
UM.Label
{
id: warning
+ width: parent.width - warningIcon.width - resetToDefaultQualityButton.width
anchors
{
left: warningIcon.right
@@ -41,7 +39,7 @@ Rectangle
leftMargin: UM.Theme.getSize("thin_margin").width
}
- text: ""
+ wrapMode: Text.WordWrap
states: [
State
diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml
index aac8dcecfb..086e27d41b 100644
--- a/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml
+++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml
@@ -40,7 +40,7 @@ Item
RecommendedQualityProfileSelector
{
width: parent.width
- visible: recommendedResolutionSelector.visible
+ hasQualityOptions: recommendedResolutionSelector.visible
}
RecommendedResolutionSelector
@@ -54,6 +54,7 @@ Item
{
width: parent.width
visible: !recommendedResolutionSelector.visible
+ Layout.fillWidth: true
}
@@ -61,6 +62,8 @@ Item
{
width: parent.width
Layout.fillWidth: true
+ Layout.topMargin: UM.Theme.getSize("thin_margin").height
+ Layout.bottomMargin: UM.Theme.getSize("thin_margin").height
}
//Line between the sections.
@@ -83,27 +86,23 @@ Item
RecommendedInfillDensitySelector
{
width: parent.width
- // TODO Create a reusable component with these properties to not define them separately for each component
labelColumnWidth: parent.firstColumnWidth
Layout.fillWidth: true
- Layout.leftMargin: UM.Theme.getSize("default_margin").width
Layout.rightMargin: UM.Theme.getSize("default_margin").width
}
RecommendedSupportSelector
{
width: parent.width
- // TODO Create a reusable component with these properties to not define them separately for each component
labelColumnWidth: parent.firstColumnWidth
- Layout.leftMargin: UM.Theme.getSize("default_margin").width
+ Layout.fillWidth: true
}
RecommendedAdhesionSelector
{
width: parent.width
- // TODO Create a reusable component with these properties to not define them separately for each component
labelColumnWidth: parent.firstColumnWidth
- Layout.leftMargin: UM.Theme.getSize("default_margin").width
+ Layout.fillWidth: true
}
}
diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml
index 6bcca955d1..87cb271ed4 100644
--- a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml
+++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml
@@ -12,8 +12,11 @@ import ".."
Item
{
id: qualityRow
+
+ property bool hasQualityOptions: true
+
height: childrenRect.height
- visible: intentSelectionRepeater.count > 1 //Only show selector if there's more options than just "default".
+ visible: intentSelectionRepeater.count > 1 && hasQualityOptions //Only show selector if there's more options than just "default".
RowLayout
{
diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml
index 6217cfe1cc..bbad686514 100644
--- a/resources/qml/PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml
+++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml
@@ -66,6 +66,11 @@ Item
{
var selected_item = model.getItem(currentIndex)
Cura.IntentManager.selectIntent(selected_item.intent_category, selected_item.quality_type)
+
+ if (Cura.IntentManager.currentIntentCategory == selected_item.intent_category)
+ {
+ recommendedResolutionSelector._previousResolution = selected_item.quality_type;
+ }
}
Connections