mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-02 08:06:43 +00:00
make return key press in search input trigger a new search
This commit is contained in:
parent
8e9365741f
commit
13a4fb3fdc
2 changed files with 6 additions and 3 deletions
apps/opencs/view/tools
|
@ -74,7 +74,9 @@ CSVTools::SearchBox::SearchBox (QWidget *parent)
|
||||||
this, SLOT (textChanged (const QString&)));
|
this, SLOT (textChanged (const QString&)));
|
||||||
|
|
||||||
connect (&mSearch, SIGNAL (clicked (bool)), this, SLOT (startSearch (bool)));
|
connect (&mSearch, SIGNAL (clicked (bool)), this, SLOT (startSearch (bool)));
|
||||||
|
|
||||||
|
connect (&mText, SIGNAL (returnPressed()), this, SLOT (startSearch()));
|
||||||
|
|
||||||
modeSelected (0);
|
modeSelected (0);
|
||||||
|
|
||||||
updateSearchButton();
|
updateSearchButton();
|
||||||
|
@ -141,5 +143,6 @@ void CSVTools::SearchBox::textChanged (const QString& text)
|
||||||
|
|
||||||
void CSVTools::SearchBox::startSearch (bool checked)
|
void CSVTools::SearchBox::startSearch (bool checked)
|
||||||
{
|
{
|
||||||
emit startSearch (getSearch());
|
if (mSearch.isEnabled())
|
||||||
|
emit startSearch (getSearch());
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace CSVTools
|
||||||
|
|
||||||
void textChanged (const QString& text);
|
void textChanged (const QString& text);
|
||||||
|
|
||||||
void startSearch (bool checked);
|
void startSearch (bool checked = true);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue