From fd8d6498ee0f84f49996a427fdb4680ea3216ea2 Mon Sep 17 00:00:00 2001 From: joeydelarago Date: Wed, 10 Aug 2022 16:45:16 +0200 Subject: [PATCH 1/4] When changing to an intent with infillDensity > 100 in recommended settings the RecommendedInfillDensitySelector would set infillDensity=100. This is because the onValueChanged function checks if the slider has a different value from the settings and updates the settings if it does. The slider has a max value of 100, so when setting the sliders value to 1000 the slider would update to have a value of 100. This would then update the setting to value to 100. The fix is as follows. When updating the slider value > 100 just ignore the first onValueChanged. Following onValueChanged, which are triggered by the user sliding the slider, will still trigger. CURA-9488 --- .../RecommendedInfillDensitySelector.qml | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml index bb3b0cdbec..0317cb7814 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml @@ -51,7 +51,17 @@ Item { target: infillSlider property: "value" - value: parseInt(infillDensity.properties.value) + value: { + // The infill slider has a max value of 100. When it is given a value > 100 onValueChanged updates the setting to be 100. + // When changing to an intent with infillDensity > 100, it would always be clamped to 100. + // This will force the slider to ignore the first onValueChanged for values > 100 so higher values can be set. + var density = parseInt(infillDensity.properties.value) + if (density > 100) { + infillSlider.ignoreValueChange = true + } + + return density + } } // Here are the elements that are shown in the left column @@ -84,6 +94,8 @@ Item { id: infillSlider + property var ignoreValueChange: false + width: parent.width height: UM.Theme.getSize("print_setup_slider_handle").height // The handle is the widest element of the slider @@ -157,7 +169,13 @@ Item target: infillSlider function onValueChanged() { - // Don't round the value if it's already the same + if (infillSlider.ignoreValueChange) + { + infillSlider.ignoreValueChange = false + return + } + + // Don't update if the setting value, if the slider has the same value if (parseInt(infillDensity.properties.value) == infillSlider.value) { return From 4667373cb4624dfb512528b2fd8966fb4206a2cd Mon Sep 17 00:00:00 2001 From: joeydelarago Date: Mon, 15 Aug 2022 17:17:40 +0200 Subject: [PATCH 2/4] Fix recipes not being uploaded to community conan repository. These booleans were strings because of a github runners bug, but that bug is fixed now so these changes are being reverted. --- .github/workflows/conan-package-create.yml | 2 +- .github/workflows/conan-recipe-export.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conan-package-create.yml b/.github/workflows/conan-package-create.yml index f9fbbef6f7..3e5f3dbe1c 100644 --- a/.github/workflows/conan-package-create.yml +++ b/.github/workflows/conan-package-create.yml @@ -149,5 +149,5 @@ jobs: run: conan upload "*" -r cura --all -c - name: Upload the Package(s) community - if: ${{ always() && inputs.conan_upload_community == 'true' }} + if: ${{ always() && inputs.conan_upload_community == true }} run: conan upload "*" -r cura-ce -c diff --git a/.github/workflows/conan-recipe-export.yml b/.github/workflows/conan-recipe-export.yml index cab21604fe..f38c0046c9 100644 --- a/.github/workflows/conan-recipe-export.yml +++ b/.github/workflows/conan-recipe-export.yml @@ -102,5 +102,5 @@ jobs: run: conan upload "*" -r cura --all -c - name: Upload the Package(s) community - if: ${{ always() && inputs.conan_upload_community == 'true' }} + if: ${{ always() && inputs.conan_upload_community == true }} run: conan upload "*" -r cura-ce -c From 0e99a0029d40bff0c59e48094f8af00fff7dbbd1 Mon Sep 17 00:00:00 2001 From: Joey de l'Arago Date: Fri, 19 Aug 2022 12:52:40 +0200 Subject: [PATCH 3/4] Update minimum conan version --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index a07500e17a..1250683926 100644 --- a/conanfile.py +++ b/conanfile.py @@ -9,7 +9,7 @@ from conan.tools import files from conan.tools.env import VirtualRunEnv, Environment from conan.errors import ConanInvalidConfiguration -required_conan_version = ">=1.47.0" +required_conan_version = ">=1.48.0" class CuraConan(ConanFile): From 6f6c2df28a049607d90d0cea6a8f58f9f1fcc11c Mon Sep 17 00:00:00 2001 From: Joey de l'Arago Date: Fri, 19 Aug 2022 14:45:42 +0200 Subject: [PATCH 4/4] Update requirements-conan-package.txt --- .github/workflows/requirements-conan-package.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/requirements-conan-package.txt b/.github/workflows/requirements-conan-package.txt index 1af154c83c..cf9d4193ef 100644 --- a/.github/workflows/requirements-conan-package.txt +++ b/.github/workflows/requirements-conan-package.txt @@ -1,2 +1,2 @@ -conan!=1.51.0,!=1.51.1,!=1.51.2 +conan!=1.51.0,!=1.51.1,!=1.51.2,!=1.51.3 sip==6.5.1