diff options
author | Janrupf <werbung.janrupf@t-online.de> | 2018-04-07 16:15:58 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-04-07 22:09:19 +0200 |
commit | 7e1c5d439a2ef6ce1346a3581776f58508a22afe (patch) | |
tree | ed9e037feaee01e100cee36369274492155a8833 /application/pages/modplatform/FTBPage.cpp | |
parent | 38ed0c2a1ff5839cc5b7a1addd25932a7c88b4de (diff) | |
download | MultiMC-7e1c5d439a2ef6ce1346a3581776f58508a22afe.tar MultiMC-7e1c5d439a2ef6ce1346a3581776f58508a22afe.tar.gz MultiMC-7e1c5d439a2ef6ce1346a3581776f58508a22afe.tar.lz MultiMC-7e1c5d439a2ef6ce1346a3581776f58508a22afe.tar.xz MultiMC-7e1c5d439a2ef6ce1346a3581776f58508a22afe.zip |
#2228, #2229 - Auto import pack icons and fixed to big version selection - Closes #2228, Closes #2229
Diffstat (limited to 'application/pages/modplatform/FTBPage.cpp')
-rw-r--r-- | application/pages/modplatform/FTBPage.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/application/pages/modplatform/FTBPage.cpp b/application/pages/modplatform/FTBPage.cpp index 7f8ee54e..f438fce7 100644 --- a/application/pages/modplatform/FTBPage.cpp +++ b/application/pages/modplatform/FTBPage.cpp @@ -50,6 +50,9 @@ FTBPage::FTBPage(NewInstanceDialog* dialog, QWidget *parent) thirdPartyFilterModel->setSorting(publicFilterModel->getCurrentSorting()); } + ui->packVersionSelection->view()->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); + ui->packVersionSelection->view()->parentWidget()->setMaximumHeight(300); + connect(ui->sortByBox, &QComboBox::currentTextChanged, this, &FTBPage::onSortingSelectionChanged); connect(ui->packVersionSelection, &QComboBox::currentTextChanged, this, &FTBPage::onVersionSelectionItemChanged); @@ -96,6 +99,15 @@ void FTBPage::suggestCurrent() if(!selected.broken) { dialog->setSuggestedPack(selected.name, new FtbPackInstallTask(selected, selectedVersion)); + if(selected.type == FtbPackType::Public) { + publicListModel->getLogo(selected.logo, [this](QString logo){ + dialog->setSuggestedIconFromFile(logo, "ftb_" + selected.name); + }); + } else if (selected.type == FtbPackType::ThirdParty) { + thirdPartyModel->getLogo(selected.logo, [this](QString logo){ + dialog->setSuggestedIconFromFile(logo, "ftb_" + selected.name); + }); + } } else { |