From 6c9c68e0041c65ea3097fb0990ff1a3e298fa0f3 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Mon, 17 Sep 2018 14:41:45 +0200 Subject: [PATCH] Active the focus when the selected item changes. In this case, if the user was updating some information in one material and then select other material, the new data is stored. Contributes to CURA-5682. --- resources/qml/Preferences/Materials/MaterialsPage.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/qml/Preferences/Materials/MaterialsPage.qml b/resources/qml/Preferences/Materials/MaterialsPage.qml index 2050f59739..a00a2340cd 100644 --- a/resources/qml/Preferences/Materials/MaterialsPage.qml +++ b/resources/qml/Preferences/Materials/MaterialsPage.qml @@ -45,7 +45,11 @@ Item Component.onCompleted: materialListView.expandActiveMaterial(active_root_material_id) // Every time the selected item has changed, notify to the details panel - onCurrentItemChanged: materialDetailsPanel.currentItem = currentItem + onCurrentItemChanged: + { + forceActiveFocus() + materialDetailsPanel.currentItem = currentItem + } // Main layout Label