From b04fabb27a78b3085741ff09255b14d20ac892d0 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Mon, 14 Mar 2022 17:33:48 +0100 Subject: [PATCH] Remove focus from SettingItems when scrolling. This fixes the issue where you can scroll combobox dropdowns out of the settingView. CURA-9039 --- resources/qml/Settings/SettingView.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index ecafd25913..53706d6fbe 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -193,6 +193,14 @@ Item cacheBuffer: 1000000 // Set a large cache to effectively just cache every list item. ScrollBar.vertical: UM.ScrollBar { id: scrollBar } + onContentYChanged: { + // This removes focus from SettingItems when scrolling. + // This fixes comboboxes staying open and scrolling out of the settingView. + if (!scrollBar.activeFocus) { + scrollBar.forceActiveFocus(); + } + } + model: UM.SettingDefinitionsModel { id: definitionsModel