From 9ffc03925469aaaebceebd7d7931ab377e2f5d95 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 20 Dec 2018 14:01:12 +0100 Subject: [PATCH 1/3] Fix logo aliasing CURA-6044 --- plugins/VersionUpgrade/VersionUpgrade32to33/__init__.py | 2 +- resources/qml/MainWindow/MainWindowHeader.qml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade32to33/__init__.py b/plugins/VersionUpgrade/VersionUpgrade32to33/__init__.py index 006b21bc48..b55ea5ebaf 100644 --- a/plugins/VersionUpgrade/VersionUpgrade32to33/__init__.py +++ b/plugins/VersionUpgrade/VersionUpgrade32to33/__init__.py @@ -47,7 +47,7 @@ def getMetaData() -> Dict[str, Any]: }, "user": { "get_version": upgrade.getCfgVersion, - "location": {"./user"} + "location": {"./user", "./materials/*"} }, "variant": { "get_version": upgrade.getCfgVersion, diff --git a/resources/qml/MainWindow/MainWindowHeader.qml b/resources/qml/MainWindow/MainWindowHeader.qml index 971b275bd8..e3b7e199fa 100644 --- a/resources/qml/MainWindow/MainWindowHeader.qml +++ b/resources/qml/MainWindow/MainWindowHeader.qml @@ -30,7 +30,8 @@ Item width: UM.Theme.getSize("logo").width height: UM.Theme.getSize("logo").height - mipmap: true + sourceSize.width: width + sourceSize.height: height } Row From f3a0b44d5ebfb7a69d54cf1610a50eeec0285941 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 20 Dec 2018 14:24:00 +0100 Subject: [PATCH 2/3] Simplify is_favorite condition No stupid ternary operators necessary. Contributes to issue CURA-6032. --- resources/qml/Preferences/Materials/MaterialsSlot.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Preferences/Materials/MaterialsSlot.qml b/resources/qml/Preferences/Materials/MaterialsSlot.qml index fb3cb9607d..7c891dc65f 100644 --- a/resources/qml/Preferences/Materials/MaterialsSlot.qml +++ b/resources/qml/Preferences/Materials/MaterialsSlot.qml @@ -15,7 +15,7 @@ Rectangle id: materialSlot property var material: null property var hovered: false - property var is_favorite: material != null ? material.is_favorite : false + property var is_favorite: material != null && material.is_favorite height: UM.Theme.getSize("favorites_row").height width: parent.width From 5bf260f5247f1367d0bf100514d596f4b8d4cfee Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 20 Dec 2018 14:25:52 +0100 Subject: [PATCH 3/3] Don't break binding of is_favorite upon clicking star We shouldn't override it here because doing that causes the binding to break. Just remove the favourite and let the model update itself, thus removing the star. Contributes to issue CURA-6032. --- resources/qml/Preferences/Materials/MaterialsSlot.qml | 2 -- 1 file changed, 2 deletions(-) diff --git a/resources/qml/Preferences/Materials/MaterialsSlot.qml b/resources/qml/Preferences/Materials/MaterialsSlot.qml index 7c891dc65f..2f4847103b 100644 --- a/resources/qml/Preferences/Materials/MaterialsSlot.qml +++ b/resources/qml/Preferences/Materials/MaterialsSlot.qml @@ -73,11 +73,9 @@ Rectangle if (materialSlot.is_favorite) { base.materialManager.removeFavorite(material.root_material_id) - materialSlot.is_favorite = false return } base.materialManager.addFavorite(material.root_material_id) - materialSlot.is_favorite = true return } style: ButtonStyle