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>
This commit is contained in:
@@ -644,7 +644,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)
|
||||
@@ -738,7 +739,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