From b1419d802861952f8f1d2dab8cb9df751f15d5d4 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 30 May 2016 16:45:36 +0200 Subject: [PATCH] Fix activating (quality)profiles on the profiles page CURA-1278 --- resources/qml/Preferences/ProfilesPage.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index 6e5d39cb49..10acc8beef 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -6,6 +6,7 @@ import QtQuick.Controls 1.1 import QtQuick.Dialogs 1.2 import UM 1.2 as UM +import Cura 1.0 as Cura UM.ManagementPage { @@ -16,6 +17,7 @@ UM.ManagementPage model: UM.InstanceContainersModel { filter: { "type": "quality" } } + onActivateObject: Cura.MachineManager.setActiveQuality(currentItem.id) onAddObject: { var selectedProfile; if (objectList.currentIndex == 0) { @@ -33,6 +35,7 @@ UM.ManagementPage onRemoveObject: confirmDialog.open(); onRenameObject: { renameDialog.removeWhenRejected = false; renameDialog.open(); renameDialog.selectText(); } + activateEnabled: currentItem != null ? currentItem.id != Cura.MachineManager.activeQualityId : false; addEnabled: currentItem != null; removeEnabled: currentItem != null ? !currentItem.readOnly : false; renameEnabled: currentItem != null ? !currentItem.readOnly : false; @@ -69,7 +72,7 @@ UM.ManagementPage Row { - visible: base.currentItem.id == -1 || base.currentItem.active + visible: base.currentItem.id == -1 || currentItem.id == Cura.MachineManager.activeQualityId Button { text: {