Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey de l'Arago <joeydelarago@gmail.com>2022-03-17 10:46:56 +0300
committerGitHub <noreply@github.com>2022-03-17 10:46:56 +0300
commitfcfc47920f5d10b40d73c18ee52895a0b7c82c1e (patch)
tree4ae36e09837f8a4003903bc371433efabde68d8f
parent40fc587d640dd336330e96b6aa9041f1d945ae02 (diff)
parent84d7443c18c1d441992523c696d29569c09c2d6f (diff)
Merge pull request #11674 from Ultimaker/CURA-9039_combobox_open_out_of_window
[CURA-9039] fix combobox scrolling out of view
-rw-r--r--resources/qml/Preferences/GeneralPage.qml8
-rw-r--r--resources/qml/Settings/SettingView.qml16
2 files changed, 17 insertions, 7 deletions
diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml
index d321a67ce9..b8f2e1b50d 100644
--- a/resources/qml/Preferences/GeneralPage.qml
+++ b/resources/qml/Preferences/GeneralPage.qml
@@ -148,6 +148,14 @@ UM.PreferencesPage
bottom: parent.bottom
right: parent.right
}
+
+ onPositionChanged: {
+ // This removes focus from items when scrolling.
+ // This fixes comboboxes staying open and scrolling container
+ if (!activeFocus) {
+ forceActiveFocus();
+ }
+ }
}
Column
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();
+ }
}
}