ui: Refocus already focused search box on find shortcut to select content
This commit is contained in:
@@ -162,6 +162,11 @@ void QtSmartSearchBox::setMatches(const std::vector<SearchMatch>& matches)
|
||||
|
||||
void QtSmartSearchBox::setFocus()
|
||||
{
|
||||
if (hasFocus())
|
||||
{
|
||||
clearFocus();
|
||||
}
|
||||
|
||||
QLineEdit::setFocus(Qt::ShortcutFocusReason);
|
||||
}
|
||||
|
||||
@@ -659,11 +664,6 @@ void QtSmartSearchBox::onElementSelected(QtSearchElement* element)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!hasFocus())
|
||||
{
|
||||
setFocus();
|
||||
}
|
||||
|
||||
if (!hasSelectedElements() && !m_shiftKeyDown)
|
||||
{
|
||||
editElement(element);
|
||||
|
||||
Reference in New Issue
Block a user