mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-26 00:15:16 +00:00
NOISSUE fix crash bug caused by urge to maker code pretty
Also added a note so this doesn't happen again...
This commit is contained in:
parent
0c73ddee73
commit
9cc93ae81d
@ -65,13 +65,14 @@ NewInstanceDialog::NewInstanceDialog(const QString & initialGroup, const QString
|
|||||||
ui->groupBox->lineEdit()->setPlaceholderText(tr("No group"));
|
ui->groupBox->lineEdit()->setPlaceholderText(tr("No group"));
|
||||||
|
|
||||||
|
|
||||||
|
// NOTE: m_buttons must be initialized before PageContainer, because it indirectly accesses m_buttons through setSuggestedPack! Do not move this below.
|
||||||
|
m_buttons = new QDialogButtonBox(QDialogButtonBox::Help | QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||||
|
|
||||||
m_container = new PageContainer(this);
|
m_container = new PageContainer(this);
|
||||||
m_container->setSizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Expanding);
|
m_container->setSizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Expanding);
|
||||||
m_container->layout()->setContentsMargins(0, 0, 0, 0);
|
m_container->layout()->setContentsMargins(0, 0, 0, 0);
|
||||||
ui->verticalLayout->insertWidget(2, m_container);
|
ui->verticalLayout->insertWidget(2, m_container);
|
||||||
|
|
||||||
m_buttons = new QDialogButtonBox(QDialogButtonBox::Help | QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
|
||||||
m_container->addButtons(m_buttons);
|
m_container->addButtons(m_buttons);
|
||||||
|
|
||||||
// Bonk Qt over its stupid head and make sure it understands which button is the default one...
|
// Bonk Qt over its stupid head and make sure it understands which button is the default one...
|
||||||
|
Loading…
Reference in New Issue
Block a user