mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
Merge pull request #2874 from Trial97/modpack_equal
This commit is contained in:
@ -36,6 +36,7 @@
|
||||
|
||||
#include "NewInstanceDialog.h"
|
||||
#include "Application.h"
|
||||
#include "ui/pages/modplatform/ModpackProviderBasePage.h"
|
||||
#include "ui/pages/modplatform/import_ftb/ImportFTBPage.h"
|
||||
#include "ui_NewInstanceDialog.h"
|
||||
|
||||
@ -140,6 +141,8 @@ NewInstanceDialog::NewInstanceDialog(const QString& initialGroup,
|
||||
auto geometry = screen->availableSize();
|
||||
resize(width(), qMin(geometry.height() - 50, 710));
|
||||
}
|
||||
|
||||
connect(m_container, &PageContainer::selectedPageChanged, this, &NewInstanceDialog::selectedPageChanged);
|
||||
}
|
||||
|
||||
void NewInstanceDialog::reject()
|
||||
@ -316,3 +319,16 @@ void NewInstanceDialog::importIconNow()
|
||||
}
|
||||
APPLICATION->settings()->set("NewInstanceGeometry", saveGeometry().toBase64());
|
||||
}
|
||||
|
||||
void NewInstanceDialog::selectedPageChanged(BasePage* previous, BasePage* selected)
|
||||
{
|
||||
auto prevPage = dynamic_cast<ModpackProviderBasePage*>(previous);
|
||||
if (prevPage) {
|
||||
m_searchTerm = prevPage->getSerachTerm();
|
||||
}
|
||||
|
||||
auto nextPage = dynamic_cast<ModpackProviderBasePage*>(selected);
|
||||
if (nextPage) {
|
||||
nextPage->setSearchTerm(m_searchTerm);
|
||||
}
|
||||
}
|
||||
|
@ -82,6 +82,7 @@ class NewInstanceDialog : public QDialog, public BasePageProvider {
|
||||
private slots:
|
||||
void on_iconButton_clicked();
|
||||
void on_instNameTextBox_textChanged(const QString& arg1);
|
||||
void selectedPageChanged(BasePage* previous, BasePage* selected);
|
||||
|
||||
private:
|
||||
Ui::NewInstanceDialog* ui = nullptr;
|
||||
@ -98,5 +99,7 @@ class NewInstanceDialog : public QDialog, public BasePageProvider {
|
||||
|
||||
QString importVersion;
|
||||
|
||||
QString m_searchTerm;
|
||||
|
||||
void importIconNow();
|
||||
};
|
||||
|
Reference in New Issue
Block a user