summaryrefslogtreecommitdiffstats
path: root/application/dialogs
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2018-07-31 02:20:04 +0200
committerPetr Mrázek <peterix@gmail.com>2018-07-31 02:20:04 +0200
commit9cc93ae81db9990594c012529001a069f584ee6c (patch)
tree524a951a235f0755b952a052340ecbd3b1d3797b /application/dialogs
parent0c73ddee73e7383d5b81185381fa1c762fcb1147 (diff)
downloadMultiMC-9cc93ae81db9990594c012529001a069f584ee6c.tar
MultiMC-9cc93ae81db9990594c012529001a069f584ee6c.tar.gz
MultiMC-9cc93ae81db9990594c012529001a069f584ee6c.tar.lz
MultiMC-9cc93ae81db9990594c012529001a069f584ee6c.tar.xz
MultiMC-9cc93ae81db9990594c012529001a069f584ee6c.zip
NOISSUE fix crash bug caused by urge to maker code pretty
Also added a note so this doesn't happen again...
Diffstat (limited to 'application/dialogs')
-rw-r--r--application/dialogs/NewInstanceDialog.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/application/dialogs/NewInstanceDialog.cpp b/application/dialogs/NewInstanceDialog.cpp
index 46e6ca34..85704ad6 100644
--- a/application/dialogs/NewInstanceDialog.cpp
+++ b/application/dialogs/NewInstanceDialog.cpp
@@ -65,13 +65,14 @@ NewInstanceDialog::NewInstanceDialog(const QString & initialGroup, const QString
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->setSizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Expanding);
m_container->layout()->setContentsMargins(0, 0, 0, 0);
ui->verticalLayout->insertWidget(2, m_container);
- m_buttons = new QDialogButtonBox(QDialogButtonBox::Help | QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
m_container->addButtons(m_buttons);
// Bonk Qt over its stupid head and make sure it understands which button is the default one...