mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-22 03:26:05 -04:00
fix search bar bad reset
Clear the search bar only if the focus is due to a mouse click
This commit is contained in:
parent
38037bbcdf
commit
d247f7e36e
@ -2,6 +2,7 @@
|
||||
|
||||
#include <QCompleter>
|
||||
#include <QTimer>
|
||||
#include <QFocusEvent>
|
||||
|
||||
#include "kiwixapp.h"
|
||||
|
||||
@ -82,7 +83,8 @@ void SearchBar::on_currentTitleChanged(const QString& title)
|
||||
|
||||
void SearchBar::focusInEvent( QFocusEvent* event)
|
||||
{
|
||||
clear();
|
||||
if (event->reason() == Qt::MouseFocusReason)
|
||||
clear();
|
||||
QLineEdit::focusInEvent(event);
|
||||
m_button.set_searchMode(true);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user