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,7 +639,8 @@ Item {
|
||||
if (expanded) {
|
||||
if (root.visibleItemCount(materialBrowserModel) > 0)
|
||||
rootView.focusMaterialSection(true)
|
||||
scrollView.forceActiveFocus()
|
||||
if (!searchBox.activeFocus)
|
||||
scrollView.forceActiveFocus()
|
||||
} else {
|
||||
root.startDelayedEnsureTimer(300) // wait for section collapse animation
|
||||
rootView.focusMaterialSection(false)
|
||||
@@ -728,7 +729,8 @@ Item {
|
||||
if (expanded) {
|
||||
if (root.visibleItemCount(materialBrowserTexturesModel) > 0)
|
||||
rootView.focusMaterialSection(false)
|
||||
scrollView.forceActiveFocus()
|
||||
if (!searchBox.activeFocus)
|
||||
scrollView.forceActiveFocus()
|
||||
} else {
|
||||
root.startDelayedEnsureTimer(300) // wait for section collapse animation
|
||||
rootView.focusMaterialSection(true)
|
||||
|
Reference in New Issue
Block a user