Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into modrinth_pack
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
commit
e095780cc3
103 changed files with 1222 additions and 550 deletions
|
@ -35,6 +35,7 @@
|
|||
*/
|
||||
|
||||
#include "Page.h"
|
||||
#include "ui/widgets/ProjectItem.h"
|
||||
#include "ui_Page.h"
|
||||
|
||||
#include <QInputDialog>
|
||||
|
@ -110,6 +111,8 @@ Page::Page(NewInstanceDialog* dialog, QWidget* parent) : QWidget(parent), dialog
|
|||
connect(ui->sortByBox, &QComboBox::currentTextChanged, this, &Page::onSortingSelectionChanged);
|
||||
connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &Page::onVersionSelectionItemChanged);
|
||||
|
||||
connect(ui->searchEdit, &QLineEdit::textChanged, this, &Page::triggerSearch);
|
||||
|
||||
connect(ui->publicPackList->selectionModel(), &QItemSelectionModel::currentChanged, this, &Page::onPublicPackSelectionChanged);
|
||||
connect(ui->thirdPartyPackList->selectionModel(), &QItemSelectionModel::currentChanged, this, &Page::onThirdPartyPackSelectionChanged);
|
||||
connect(ui->privatePackList->selectionModel(), &QItemSelectionModel::currentChanged, this, &Page::onPrivatePackSelectionChanged);
|
||||
|
@ -125,6 +128,9 @@ Page::Page(NewInstanceDialog* dialog, QWidget* parent) : QWidget(parent), dialog
|
|||
ui->thirdPartyPackList->selectionModel()->reset();
|
||||
ui->privatePackList->selectionModel()->reset();
|
||||
|
||||
ui->publicPackList->setItemDelegate(new ProjectItemDelegate(this));
|
||||
ui->thirdPartyPackList->setItemDelegate(new ProjectItemDelegate(this));
|
||||
ui->privatePackList->setItemDelegate(new ProjectItemDelegate(this));
|
||||
onTabChanged(ui->tabWidget->currentIndex());
|
||||
}
|
||||
|
||||
|
@ -315,6 +321,8 @@ void Page::onTabChanged(int tab)
|
|||
currentModpackInfo = ui->publicPackDescription;
|
||||
}
|
||||
|
||||
triggerSearch();
|
||||
|
||||
currentList->selectionModel()->reset();
|
||||
QModelIndex idx = currentList->currentIndex();
|
||||
if (idx.isValid()) {
|
||||
|
@ -354,4 +362,9 @@ void Page::onRemovePackClicked()
|
|||
onPackSelectionChanged();
|
||||
}
|
||||
|
||||
void Page::triggerSearch()
|
||||
{
|
||||
currentModel->setSearchTerm(ui->searchEdit->text());
|
||||
}
|
||||
|
||||
} // namespace LegacyFTB
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue