Merge pull request #1837 from Trial97/import_ok

This commit is contained in:
Sefa Eyeoglu 2024-03-27 10:50:58 +01:00 committed by GitHub
commit 5d72ee1c4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -97,6 +97,9 @@ NewInstanceDialog::NewInstanceDialog(const QString& initialGroup,
ui->verticalLayout->insertWidget(2, m_container);
m_container->addButtons(m_buttons);
connect(m_container, &PageContainer::selectedPageChanged, this, [this](BasePage* previous, BasePage* selected) {
m_buttons->button(QDialogButtonBox::Ok)->setEnabled(creationTask && !instName().isEmpty());
});
// Bonk Qt over its stupid head and make sure it understands which button is the default one...
// See: https://stackoverflow.com/questions/24556831/qbuttonbox-set-default-button

View file

@ -104,6 +104,7 @@ void ModrinthPage::retranslate()
void ModrinthPage::openedImpl()
{
BasePage::openedImpl();
suggestCurrent();
triggerSearch();
}