forked from qt-creator/qt-creator
QmlDesigner: Don't change focus on expand when focus is in search box
This is to avoid search box focus loss if search autoexpands sections.
Fixes: QDS-9259
Change-Id: Ief99643d52413fe83d4b5ac5ea3438d6116d64c7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
(cherry picked from commit 26e2342e24
)
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
89a7d35725
commit
878a5db73e
@@ -639,6 +639,7 @@ Item {
|
|||||||
if (expanded) {
|
if (expanded) {
|
||||||
if (root.visibleItemCount(materialBrowserModel) > 0)
|
if (root.visibleItemCount(materialBrowserModel) > 0)
|
||||||
rootView.focusMaterialSection(true)
|
rootView.focusMaterialSection(true)
|
||||||
|
if (!searchBox.activeFocus)
|
||||||
scrollView.forceActiveFocus()
|
scrollView.forceActiveFocus()
|
||||||
} else {
|
} else {
|
||||||
root.startDelayedEnsureTimer(300) // wait for section collapse animation
|
root.startDelayedEnsureTimer(300) // wait for section collapse animation
|
||||||
@@ -728,6 +729,7 @@ Item {
|
|||||||
if (expanded) {
|
if (expanded) {
|
||||||
if (root.visibleItemCount(materialBrowserTexturesModel) > 0)
|
if (root.visibleItemCount(materialBrowserTexturesModel) > 0)
|
||||||
rootView.focusMaterialSection(false)
|
rootView.focusMaterialSection(false)
|
||||||
|
if (!searchBox.activeFocus)
|
||||||
scrollView.forceActiveFocus()
|
scrollView.forceActiveFocus()
|
||||||
} else {
|
} else {
|
||||||
root.startDelayedEnsureTimer(300) // wait for section collapse animation
|
root.startDelayedEnsureTimer(300) // wait for section collapse animation
|
||||||
|
Reference in New Issue
Block a user