From eaedca191743513095a8b2fc82fde42b32561f29 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 1 Nov 2019 11:54:17 +0100 Subject: Convert unit of adaptive layers threshold and change name This usage is hopefully more intuitive than the previous one. --- .../VersionUpgrade/VersionUpgrade43to44/VersionUpgrade43to44.py | 7 +++++++ resources/definitions/fdmprinter.def.json | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade43to44/VersionUpgrade43to44.py b/plugins/VersionUpgrade/VersionUpgrade43to44/VersionUpgrade43to44.py index e8eefb1bb0..40927fe3a0 100644 --- a/plugins/VersionUpgrade/VersionUpgrade43to44/VersionUpgrade43to44.py +++ b/plugins/VersionUpgrade/VersionUpgrade43to44/VersionUpgrade43to44.py @@ -66,6 +66,13 @@ class VersionUpgrade43to44(VersionUpgrade): # Alternate skin rotation should be translated to top/bottom line directions. if "skin_alternate_rotation" in parser["values"] and parseBool(parser["values"]["skin_alternate_rotation"]): parser["values"]["skin_angles"] = "[45, 135, 0, 90]" + # Unit of adaptive layers topography size changed. + if "adaptive_layer_height_threshold" in parser["values"]: + val = parser["values"]["adaptive_layer_height_threshold"] + if val.startswith("="): + val = val[1:] + val = "=({val}) / 1000".format(val = val) # Convert microns to millimetres. Works even if the profile contained a formula. + parser["values"]["adaptive_layer_height_threshold"] = val result = io.StringIO() parser.write(result) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 8511d9e969..90d6c8e2d8 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -7074,11 +7074,12 @@ }, "adaptive_layer_height_threshold": { - "label": "Adaptive Layers Threshold", - "description": "Threshold whether to use a smaller layer or not. This number is compared to the tan of the steepest slope in a layer.", + "label": "Adaptive Layers Topography Size", + "description": "Target horizontal distance between two adjacent layers. Reducing this setting causes thinner layers to be used to bring the edges of the layers closer together.", "type": "float", "enabled": "adaptive_layer_height_enabled", - "default_value": 200.0, + "default_value": 0.2, + "unit": "mm", "settable_per_mesh": false, "settable_per_extruder": false, "settable_per_meshgroup": false -- cgit v1.2.3 From 36d4162f35a26a8fa738cca07ea3f12df33d3439 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 1 Nov 2019 13:19:16 +0100 Subject: Fix fallback to global if extruder_nr doesn't exist Fixes #6590. --- plugins/CuraEngineBackend/StartSliceJob.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 29a6d8ff30..43d54d8b12 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -1,4 +1,4 @@ -# Copyright (c) 2018 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import numpy @@ -72,7 +72,7 @@ class GcodeStartEndFormatter(Formatter): value = default_value_str # "-1" is global stack, and if the setting value exists in the global stack, use it as the fallback value. if key in kwargs["-1"]: - value = kwargs["-1"] + value = kwargs["-1"][key] if str(extruder_nr) in kwargs and key in kwargs[str(extruder_nr)]: value = kwargs[str(extruder_nr)][key] -- cgit v1.2.3 From 248f4fc21c791e92a013dbc96a8f7c1adab9f324 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Fri, 1 Nov 2019 13:54:52 +0100 Subject: Draw the NoIntentIcon over the intent description hover area. This fixes a bug where the NoIntent tooltip was hidden by the intent description CURA-6936 (cherry picked from commit 315b93a1525ba53f520f12b09669668266f12c6c) --- .../RecommendedQualityProfileSelector.qml | 29 ++++++++++++---------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml index 3c7caad470..5e58faec78 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml @@ -124,18 +124,6 @@ Item elide: Text.ElideRight } - NoIntentIcon - { - affected_extruders: Cura.MachineManager.extruderPositionsWithNonActiveIntent - intent_type: model.name - anchors.right: intentCategoryLabel.right - anchors.rightMargin: UM.Theme.getSize("narrow_margin").width - width: intentCategoryLabel.height * 0.75 - anchors.verticalCenter: parent.verticalCenter - height: width - visible: Cura.MachineManager.activeIntentCategory == model.intent_category && affected_extruders.length - } - Cura.RadioCheckbar { anchors @@ -164,8 +152,9 @@ Item isCheckedFunction: checkedFunction } - MouseArea // tooltip hover area + MouseArea // Intent description tooltip hover area { + id: intentDescriptionHoverArea anchors.fill: parent hoverEnabled: true enabled: model.description !== undefined @@ -181,6 +170,20 @@ Item } onExited: base.hideTooltip() } + + NoIntentIcon // This icon has hover priority over intentDescriptionHoverArea, so draw it above it. + { + affected_extruders: Cura.MachineManager.extruderPositionsWithNonActiveIntent + intent_type: model.name + anchors.right: intentCategoryLabel.right + anchors.rightMargin: UM.Theme.getSize("narrow_margin").width + width: intentCategoryLabel.height * 0.75 + anchors.verticalCenter: parent.verticalCenter + height: width + visible: Cura.MachineManager.activeIntentCategory == model.intent_category && affected_extruders.length + } + + } } -- cgit v1.2.3 From 8389c2c17a5b77ec2535f4f7071cb506d1161c15 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Mon, 4 Nov 2019 11:51:10 +0100 Subject: Add the (probably) final intent profile descriptions (English) CURA-6890 --- cura/Machines/Models/IntentCategoryModel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/Machines/Models/IntentCategoryModel.py b/cura/Machines/Models/IntentCategoryModel.py index a968d12b7a..b149852462 100644 --- a/cura/Machines/Models/IntentCategoryModel.py +++ b/cura/Machines/Models/IntentCategoryModel.py @@ -37,15 +37,15 @@ class IntentCategoryModel(ListModel): } _translations["visual"] = { "name": catalog.i18nc("@label", "Visual"), - "description": catalog.i18nc("@text", "Optimized for appearance") + "description": catalog.i18nc("@text", "The visual profile is designed to print visual prototypes and models with the intent of high visual and surface quality.") } _translations["engineering"] = { "name": catalog.i18nc("@label", "Engineering"), - "description": catalog.i18nc("@text", "Optimized for higher accuracy") + "description": catalog.i18nc("@text", "The engineering profile is designed to print functional prototypes and end-use parts with the intent of improved accuracy and for tighter tolerances.") } _translations["quick"] = { "name": catalog.i18nc("@label", "Draft"), - "description": catalog.i18nc("@text", "Optimized for fast results") + "description": catalog.i18nc("@text", "The draft profile is designed to print initial prototypes and concept validation with the intent of significant print time reduction.") } -- cgit v1.2.3 From 2e3c3c7bd057f2dfa376e8ccb687b96333bae15e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 4 Nov 2019 16:07:15 +0100 Subject: Change the engineering intent tooltip (again) Let's hope that this is the final one... CURA-6890 --- cura/Machines/Models/IntentCategoryModel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Machines/Models/IntentCategoryModel.py b/cura/Machines/Models/IntentCategoryModel.py index b149852462..cb81aec3c7 100644 --- a/cura/Machines/Models/IntentCategoryModel.py +++ b/cura/Machines/Models/IntentCategoryModel.py @@ -41,7 +41,7 @@ class IntentCategoryModel(ListModel): } _translations["engineering"] = { "name": catalog.i18nc("@label", "Engineering"), - "description": catalog.i18nc("@text", "The engineering profile is designed to print functional prototypes and end-use parts with the intent of improved accuracy and for tighter tolerances.") + "description": catalog.i18nc("@text", "The engineering profile is designed to print functional prototypes and end-use parts with the intent of better accuracy and for closer tolerances.") } _translations["quick"] = { "name": catalog.i18nc("@label", "Draft"), -- cgit v1.2.3 From 3e13156741e63b196ffea3909abc43ec672d393c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 30 Oct 2019 13:40:13 +0100 Subject: Replace logo in the top left corner This aligns it with the other Ultimaker products. Sorry, overruled by higher up. Corporate things. Contributes to issue CURA-6934. --- resources/themes/cura-light/images/logo.svg | 53 +++++++++-------------------- 1 file changed, 17 insertions(+), 36 deletions(-) diff --git a/resources/themes/cura-light/images/logo.svg b/resources/themes/cura-light/images/logo.svg index 814b157e2a..24d8da8c46 100644 --- a/resources/themes/cura-light/images/logo.svg +++ b/resources/themes/cura-light/images/logo.svg @@ -1,37 +1,18 @@ - - - - - - - + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From fcd712cf8272dc922454fa324e97bb869078444b Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 30 Oct 2019 13:50:42 +0100 Subject: Make logo larger Seems to be more towards what the rest of the products show. Contributes to issue CURA-6934. --- resources/themes/cura-light/theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 0d9f624805..055f176b33 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -483,7 +483,7 @@ "default_lining": [0.08, 0.08], "default_arrow": [0.8, 0.8], - "logo": [8, 1.75], + "logo": [16, 3.5], "wide_margin": [2.0, 2.0], "thick_margin": [1.71, 1.43], -- cgit v1.2.3 From 726cf3b7a4486c09a8c7f224d84ff4ecd8bb4f4e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 30 Oct 2019 14:05:35 +0100 Subject: Fix typo in the R Contributes to issue CURA-6934. --- resources/themes/cura-light/images/logo.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/cura-light/images/logo.svg b/resources/themes/cura-light/images/logo.svg index 24d8da8c46..611840e248 100644 --- a/resources/themes/cura-light/images/logo.svg +++ b/resources/themes/cura-light/images/logo.svg @@ -12,7 +12,7 @@ - + -- cgit v1.2.3 From f1b9ac1c2128f394f1aa7bc151e5c29c4cd4e24e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 4 Nov 2019 16:15:24 +0100 Subject: Fix aspect ratio of logo in about window CURA-6934 --- resources/qml/Dialogs/AboutDialog.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/Dialogs/AboutDialog.qml b/resources/qml/Dialogs/AboutDialog.qml index 584903dd60..a5622aa2c9 100644 --- a/resources/qml/Dialogs/AboutDialog.qml +++ b/resources/qml/Dialogs/AboutDialog.qml @@ -41,6 +41,7 @@ UM.Dialog source: UM.Theme.getImage("logo") sourceSize.width: width sourceSize.height: height + fillMode: Image.PreserveAspectFit anchors.top: parent.top anchors.topMargin: parent.topPadding -- cgit v1.2.3 From 9d9d82dc242d418d09c8769cff9a9abfddf0bee9 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 4 Nov 2019 16:58:57 +0100 Subject: Make logging when using a fallback for preferred material more explicit CURA-6950 --- cura/Machines/VariantNode.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura/Machines/VariantNode.py b/cura/Machines/VariantNode.py index b93be9773e..8275c70e62 100644 --- a/cura/Machines/VariantNode.py +++ b/cura/Machines/VariantNode.py @@ -88,6 +88,7 @@ class VariantNode(ContainerNode): # First fallback: Choose any material with matching diameter. for material_node in self.materials.values(): if material_node.getMetaDataEntry("approximate_diameter") and approximate_diameter == int(material_node.getMetaDataEntry("approximate_diameter")): + Logger.log("w", "Could not find preferred material %s, falling back to whatever works", self.machine.preferred_material) return material_node fallback = next(iter(self.materials.values())) # Should only happen with empty material node. Logger.log("w", "Could not find preferred material {preferred_material} with diameter {diameter} for variant {variant_id}, falling back to {fallback}.".format( -- cgit v1.2.3 From 366dd4bd00e4af362360a81a2b78d9e9b5295372 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 5 Nov 2019 09:33:50 +0100 Subject: Swap the splashscreen image RIP Ultibot :( CURA-6656 --- cura/UI/CuraSplashScreen.py | 8 ++++---- resources/images/cura.png | Bin 33083 -> 25786 bytes 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cura/UI/CuraSplashScreen.py b/cura/UI/CuraSplashScreen.py index 77c9ad1427..05231c106d 100644 --- a/cura/UI/CuraSplashScreen.py +++ b/cura/UI/CuraSplashScreen.py @@ -56,11 +56,11 @@ class CuraSplashScreen(QSplashScreen): if buildtype: version[0] += " (%s)" % buildtype - # draw version text + # Draw version text font = QFont() # Using system-default font here font.setPixelSize(37) painter.setFont(font) - painter.drawText(215, 66, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[0]) + painter.drawText(60, 66, 330 * self._scale, 230 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[0]) if len(version) > 1: font.setPixelSize(16) painter.setFont(font) @@ -68,14 +68,14 @@ class CuraSplashScreen(QSplashScreen): painter.drawText(247, 105, 330 * self._scale, 255 * self._scale, Qt.AlignLeft | Qt.AlignTop, version[1]) painter.setPen(QColor(255, 255, 255, 255)) - # draw the loading image + # Draw the loading image pen = QPen() pen.setWidth(6 * self._scale) pen.setColor(QColor(32, 166, 219, 255)) painter.setPen(pen) painter.drawArc(60, 150, 32 * self._scale, 32 * self._scale, self._loading_image_rotation_angle * 16, 300 * 16) - # draw message text + # Draw message text if self._current_message: font = QFont() # Using system-default font here font.setPixelSize(13) diff --git a/resources/images/cura.png b/resources/images/cura.png index 4fef842ff4..2d6a75f571 100644 Binary files a/resources/images/cura.png and b/resources/images/cura.png differ -- cgit v1.2.3 From 870db0641bdb89c3efd06f58c761454d1c31419d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 5 Nov 2019 13:11:49 +0100 Subject: Ensure that machines with 1.75mm filament select the right preferred material CURA-6950 --- cura/Machines/VariantNode.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cura/Machines/VariantNode.py b/cura/Machines/VariantNode.py index 8275c70e62..b2115ca099 100644 --- a/cura/Machines/VariantNode.py +++ b/cura/Machines/VariantNode.py @@ -85,11 +85,20 @@ class VariantNode(ContainerNode): for base_material, material_node in self.materials.items(): if self.machine.preferred_material == base_material and approximate_diameter == int(material_node.getMetaDataEntry("approximate_diameter")): return material_node - # First fallback: Choose any material with matching diameter. + + # First fallback: Check if we should be checking for the 175 variant. + if approximate_diameter == 2: + preferred_material = self.machine.preferred_material + "_175" + for base_material, material_node in self.materials.items(): + if preferred_material == base_material and approximate_diameter == int(material_node.getMetaDataEntry("approximate_diameter")): + return material_node + + # Second fallback: Choose any material with matching diameter. for material_node in self.materials.values(): if material_node.getMetaDataEntry("approximate_diameter") and approximate_diameter == int(material_node.getMetaDataEntry("approximate_diameter")): Logger.log("w", "Could not find preferred material %s, falling back to whatever works", self.machine.preferred_material) return material_node + fallback = next(iter(self.materials.values())) # Should only happen with empty material node. Logger.log("w", "Could not find preferred material {preferred_material} with diameter {diameter} for variant {variant_id}, falling back to {fallback}.".format( preferred_material = self.machine.preferred_material, -- cgit v1.2.3 From 674d8d387b0769bbd698e69c6115286bedf4f31e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 5 Nov 2019 14:52:12 +0100 Subject: Move translations for intent to it's own file CURA-6956 --- cura/Machines/Models/IntentCategoryModel.py | 28 ++++------------------------ cura/Machines/Models/IntentTranslations.py | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 24 deletions(-) create mode 100644 cura/Machines/Models/IntentTranslations.py diff --git a/cura/Machines/Models/IntentCategoryModel.py b/cura/Machines/Models/IntentCategoryModel.py index cb81aec3c7..a09d6ce3c4 100644 --- a/cura/Machines/Models/IntentCategoryModel.py +++ b/cura/Machines/Models/IntentCategoryModel.py @@ -2,8 +2,8 @@ #Cura is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import Qt, QTimer -import collections from typing import TYPE_CHECKING, Optional, Dict +from cura.Machines.Models.IntentTranslations import intent_translations from cura.Machines.Models.IntentModel import IntentModel from cura.Settings.IntentManager import IntentManager @@ -29,26 +29,6 @@ class IntentCategoryModel(ListModel): modelUpdated = pyqtSignal() - # Translations to user-visible string. Ordered by weight. - # TODO: Create a solution for this name and weight to be used dynamically. - _translations = collections.OrderedDict() # type: "collections.OrderedDict[str,Dict[str,Optional[str]]]" - _translations["default"] = { - "name": catalog.i18nc("@label", "Default") - } - _translations["visual"] = { - "name": catalog.i18nc("@label", "Visual"), - "description": catalog.i18nc("@text", "The visual profile is designed to print visual prototypes and models with the intent of high visual and surface quality.") - } - _translations["engineering"] = { - "name": catalog.i18nc("@label", "Engineering"), - "description": catalog.i18nc("@text", "The engineering profile is designed to print functional prototypes and end-use parts with the intent of better accuracy and for closer tolerances.") - } - _translations["quick"] = { - "name": catalog.i18nc("@label", "Draft"), - "description": catalog.i18nc("@text", "The draft profile is designed to print initial prototypes and concept validation with the intent of significant print time reduction.") - } - - ## Creates a new model for a certain intent category. # \param The category to list the intent profiles for. def __init__(self, intent_category: str) -> None: @@ -99,15 +79,15 @@ class IntentCategoryModel(ListModel): "name": IntentCategoryModel.translation(category, "name", catalog.i18nc("@label", "Unknown")), "description": IntentCategoryModel.translation(category, "description", None), "intent_category": category, - "weight": list(self._translations.keys()).index(category), + "weight": list(intent_translations).index(category), "qualities": qualities }) result.sort(key = lambda k: k["weight"]) self.setItems(result) - ## Get a display value for a category. See IntenCategoryModel._translations + ## Get a display value for a category. ## for categories and keys @staticmethod def translation(category: str, key: str, default: Optional[str] = None): - display_strings = IntentCategoryModel._translations.get(category, {}) + display_strings = intent_translations.get(category, {}) return display_strings.get(key, default) diff --git a/cura/Machines/Models/IntentTranslations.py b/cura/Machines/Models/IntentTranslations.py new file mode 100644 index 0000000000..fd6a2db9ee --- /dev/null +++ b/cura/Machines/Models/IntentTranslations.py @@ -0,0 +1,20 @@ +import collections +from UM.i18n import i18nCatalog +catalog = i18nCatalog("cura") + +intent_translations = collections.OrderedDict() # type: "collections.OrderedDict[str, Dict[str, Optional[str]]]" +intent_translations["default"] = { + "name": catalog.i18nc("@label", "Default") +} +intent_translations["visual"] = { + "name": catalog.i18nc("@label", "Visual"), + "description": catalog.i18nc("@text", "The visual profile is designed to print visual prototypes and models with the intent of high visual and surface quality.") +} +intent_translations["engineering"] = { + "name": catalog.i18nc("@label", "Engineering"), + "description": catalog.i18nc("@text", "The engineering profile is designed to print functional prototypes and end-use parts with the intent of better accuracy and for closer tolerances.") +} +intent_translations["quick"] = { + "name": catalog.i18nc("@label", "Draft"), + "description": catalog.i18nc("@text", "The draft profile is designed to print initial prototypes and concept validation with the intent of significant print time reduction.") +} \ No newline at end of file -- cgit v1.2.3 From ff8d8735de168a7ba61c1d8188f5ae353c4f786d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 5 Nov 2019 14:57:44 +0100 Subject: Make the intents in QualityManagementModel also translated CURA-6956 --- cura/Machines/Models/QualityManagementModel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cura/Machines/Models/QualityManagementModel.py b/cura/Machines/Models/QualityManagementModel.py index d8b0785778..6a73a1104f 100644 --- a/cura/Machines/Models/QualityManagementModel.py +++ b/cura/Machines/Models/QualityManagementModel.py @@ -14,6 +14,7 @@ from cura.Machines.ContainerTree import ContainerTree from cura.Settings.cura_empty_instance_containers import empty_quality_changes_container from cura.Settings.IntentManager import IntentManager from cura.Machines.Models.MachineModelUtils import fetchLayerHeight +from cura.Machines.Models.IntentTranslations import intent_translations from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") @@ -336,7 +337,7 @@ class QualityManagementModel(ListModel): "quality_type": quality_type, "quality_changes_group": None, "intent_category": intent_category, - "section_name": catalog.i18nc("@label", intent_category.capitalize()), + "section_name": catalog.i18nc("@label", intent_translations.get(intent_category, {}).get("name", catalog.i18nc("@label", "Unknown"))), }) # Sort by quality_type for each intent category result = sorted(result, key = lambda x: (x["intent_category"], x["quality_type"])) -- cgit v1.2.3 From 04304c1515c7d0e56af37deb0683c903ac048fc9 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 5 Nov 2019 14:59:44 +0100 Subject: Correctly sort the intents in QualityManagementModel CURA-6956 --- cura/Machines/Models/QualityManagementModel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cura/Machines/Models/QualityManagementModel.py b/cura/Machines/Models/QualityManagementModel.py index 6a73a1104f..74dc8649d0 100644 --- a/cura/Machines/Models/QualityManagementModel.py +++ b/cura/Machines/Models/QualityManagementModel.py @@ -340,7 +340,8 @@ class QualityManagementModel(ListModel): "section_name": catalog.i18nc("@label", intent_translations.get(intent_category, {}).get("name", catalog.i18nc("@label", "Unknown"))), }) # Sort by quality_type for each intent category - result = sorted(result, key = lambda x: (x["intent_category"], x["quality_type"])) + + result = sorted(result, key = lambda x: (list(intent_translations).index(x["intent_category"]), x["quality_type"])) item_list += result # Create quality_changes group items -- cgit v1.2.3 From da92c36afbd4af1e56b421adbaf562acd0e3ec31 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 6 Nov 2019 17:22:58 +0100 Subject: Don't show tooltip immediately. --- .../Recommended/RecommendedQualityProfileSelector.qml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml index 5e58faec78..7c527f9448 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml @@ -160,14 +160,20 @@ Item enabled: model.description !== undefined acceptedButtons: Qt.NoButton // react to hover only, don't steal clicks - onEntered: + Timer { - base.showTooltip( + id: intentTooltipTimer + interval: 500 + running: false + repeat: false + onTriggered: base.showTooltip( intentCategoryLabel, Qt.point(-(intentCategoryLabel.x - qualityRow.x) - UM.Theme.getSize("thick_margin").width, 0), model.description ) } + + onEntered: intentTooltipTimer.start() onExited: base.hideTooltip() } -- cgit v1.2.3