diff options
author | Joey de l'Arago <joeydelarago@gmail.com> | 2022-03-17 10:46:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-17 10:46:56 +0300 |
commit | fcfc47920f5d10b40d73c18ee52895a0b7c82c1e (patch) | |
tree | 4ae36e09837f8a4003903bc371433efabde68d8f /resources/qml/Settings | |
parent | 40fc587d640dd336330e96b6aa9041f1d945ae02 (diff) | |
parent | 84d7443c18c1d441992523c696d29569c09c2d6f (diff) |
Merge pull request #11674 from Ultimaker/CURA-9039_combobox_open_out_of_window
[CURA-9039] fix combobox scrolling out of view
Diffstat (limited to 'resources/qml/Settings')
-rw-r--r-- | resources/qml/Settings/SettingView.qml | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index a327048f2e..40e9e19b01 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -188,13 +188,15 @@ Item } clip: true 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(); + ScrollBar.vertical: UM.ScrollBar + { + id: scrollBar + onPositionChanged: { + // This removes focus from items when scrolling. + // This fixes comboboxes staying open and scrolling container + if (!activeFocus) { + forceActiveFocus(); + } } } |