diff --git a/launcher/pages/modplatform/ftb/FtbPage.cpp b/launcher/pages/modplatform/ftb/FtbPage.cpp
index 5917b979..aca93cfe 100644
--- a/launcher/pages/modplatform/ftb/FtbPage.cpp
+++ b/launcher/pages/modplatform/ftb/FtbPage.cpp
@@ -32,7 +32,8 @@ FtbPage::FtbPage(NewInstanceDialog* dialog, QWidget *parent)
}
ui->sortByBox->setCurrentText(filterModel->translateCurrentSorting());
- connect(ui->searchButton, &QPushButton::clicked, this, &FtbPage::triggerSearch);
+ connect(ui->searchEdit, &QLineEdit::textChanged, this, &FtbPage::triggerSearch);
+ connect(ui->resetButton, &QPushButton::clicked, this, &FtbPage::resetSearch);
connect(ui->sortByBox, &QComboBox::currentTextChanged, this, &FtbPage::onSortingSelectionChanged);
connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &FtbPage::onSelectionChanged);
connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &FtbPage::onVersionSelectionChanged);
@@ -104,6 +105,11 @@ void FtbPage::triggerSearch()
filterModel->setSearchTerm(ui->searchEdit->text());
}
+void FtbPage::resetSearch()
+{
+ ui->searchEdit->setText("");
+}
+
void FtbPage::onSortingSelectionChanged(QString data)
{
auto toSet = filterModel->getAvailableSortings().value(data);
diff --git a/launcher/pages/modplatform/ftb/FtbPage.h b/launcher/pages/modplatform/ftb/FtbPage.h
index bca09e25..0dfac1a4 100644
--- a/launcher/pages/modplatform/ftb/FtbPage.h
+++ b/launcher/pages/modplatform/ftb/FtbPage.h
@@ -65,6 +65,8 @@ private:
private slots:
void triggerSearch();
+ void resetSearch();
+
void onSortingSelectionChanged(QString data);
void onSelectionChanged(QModelIndex first, QModelIndex second);
void onVersionSelectionChanged(QString data);
diff --git a/launcher/pages/modplatform/ftb/FtbPage.ui b/launcher/pages/modplatform/ftb/FtbPage.ui
index 135afc6d..dc800497 100644
--- a/launcher/pages/modplatform/ftb/FtbPage.ui
+++ b/launcher/pages/modplatform/ftb/FtbPage.ui
@@ -39,9 +39,9 @@
-
-
+
- Search
+ Reset
@@ -49,15 +49,15 @@
-
+
+ true
+
48
48
-
- true
-
-
@@ -76,7 +76,7 @@
searchEdit
- searchButton
+ resetButton
versionSelectionBox