From 784707bb85347e79fb7030e84bfabc29b0371724 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 15 Jan 2018 14:40:37 +0100 Subject: [PATCH 1/4] Stay on the same build plate after everything is removed CURA-4795 --- cura/CuraApplication.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 428a26f956..099c71c708 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1063,7 +1063,8 @@ class CuraApplication(QtApplication): Logger.log("i", "Reseting print information") self._print_information = PrintInformation.PrintInformation() - self.getCuraSceneController().setActiveBuildPlate(0) # Select first build plate + # stay on the same build plate + #self.getCuraSceneController().setActiveBuildPlate(0) # Select first build plate ## Reset all translation on nodes with mesh data. @pyqtSlot() From 9a5b2158143b816067cc947f8357419b5be05d15 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 15 Jan 2018 15:16:41 +0100 Subject: [PATCH 2/4] Do not show not supported when there are supported profiles CURA-4796 --- cura/Settings/ProfilesModel.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/cura/Settings/ProfilesModel.py b/cura/Settings/ProfilesModel.py index cf58a49905..15b123d12f 100644 --- a/cura/Settings/ProfilesModel.py +++ b/cura/Settings/ProfilesModel.py @@ -74,18 +74,11 @@ class ProfilesModel(InstanceContainersModel): # The actual list of quality profiles come from the first extruder in the extruder list. result = QualityManager.getInstance().findAllUsableQualitiesForMachineAndExtruders(global_container_stack, extruder_stacks) - # append empty quality if it's not there - if not any(q.getId() == self._empty_quality.getId() for q in result): - result.append(self._empty_quality) - # The usable quality types are set quality_type_set = set([x.getMetaDataEntry("quality_type") for x in result]) # Fetch all qualities available for this machine and the materials selected in extruders all_qualities = QualityManager.getInstance().findAllQualitiesForMachineAndMaterials(global_stack_definition, materials) - # append empty quality if it's not there - if not any(q.getId() == self._empty_quality.getId() for q in all_qualities): - all_qualities.append(self._empty_quality) # If in the all qualities there is some of them that are not available due to incompatibility with materials # we also add it so that they will appear in the slide quality bar. However in recomputeItems will be marked as @@ -94,6 +87,9 @@ class ProfilesModel(InstanceContainersModel): if quality.getMetaDataEntry("quality_type") not in quality_type_set: result.append(quality) + if len(result) > 1: + result.remove(self._empty_quality) + return {item.getId(): item for item in result}, {} #Only return true profiles for now, no metadata. The quality manager is not able to get only metadata yet. ## Re-computes the items in this model, and adds the layer height role. From 616615067c20f03f7491d1bbf0a49cdcd0577613 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 15 Jan 2018 15:17:14 +0100 Subject: [PATCH 3/4] Fix quality name in selected profile box CURA-4796 --- resources/qml/Settings/SettingView.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 8cecd81099..57e613a00f 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -63,9 +63,9 @@ Item menu: ProfileMenu { } function generateActiveQualityText () { - result = Cura.MachineManager.activeQualityName + var result = Cura.MachineManager.activeQualityName; - if (Cura.MachineManager.isActiveQualitySupported ) { + if (Cura.MachineManager.isActiveQualitySupported) { if (Cura.MachineManager.activeQualityLayerHeight > 0) { result += " " result += " - " From 064a8e6f6c4b2b8a209b0be2566d67a5fc8b22c3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 15 Jan 2018 16:41:33 +0100 Subject: [PATCH 4/4] Elide labels next to checkboxes To the available width, if there is a width. This won't work for right-to-left languages though... Contributes to issue CURA-4692. --- resources/themes/cura-light/styles.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml index 7532f0dfaf..20f858c238 100755 --- a/resources/themes/cura-light/styles.qml +++ b/resources/themes/cura-light/styles.qml @@ -864,9 +864,10 @@ QtObject { } } label: Label { - text: control.text; - color: Theme.getColor("checkbox_text"); - font: Theme.getFont("default"); + text: control.text + color: Theme.getColor("checkbox_text") + font: Theme.getFont("default") + elide: Text.ElideRight } } }