Browse Source

Re-implement showing active profile as italic

This went got removed during a merge conflict

see
https://github.com/Ultimaker/Cura/pull/11696
https://github.com/Ultimaker/Uranium/pull/798

CURA-9044
casper 3 years ago
parent
commit
d7cf7ee97d
1 changed files with 12 additions and 0 deletions
  1. 12 0
      resources/qml/Preferences/ProfilesPage.qml

+ 12 - 0
resources/qml/Preferences/ProfilesPage.qml

@@ -66,6 +66,18 @@ UM.ManagementPage
         // reset height to initial heigt
         // reset height to initial heigt
         hamburger_button.height = hamburerButtonHeight;
         hamburger_button.height = hamburerButtonHeight;
     }
     }
+
+    isActiveModelFunction: function(model, id) {
+        if (model.is_read_only)
+        {
+            return (model.name == Cura.MachineManager.activeQualityOrQualityChangesName) && (model.intent_category == Cura.MachineManager.activeIntentCategory);
+        }
+        else
+        {
+            return model.name == Cura.MachineManager.activeQualityOrQualityChangesName;
+        }
+    }
+
     sectionRole: "section_name"
     sectionRole: "section_name"
 
 
     model: qualityManagementModel
     model: qualityManagementModel