summaryrefslogtreecommitdiffstats
path: root/application/dialogs/NewInstanceDialog.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-04-11 01:30:50 +0200
committerPetr Mrázek <peterix@gmail.com>2016-04-11 01:30:50 +0200
commit432ec7417499c6fa6b0c2935c96ad5f3d1d097c1 (patch)
treeff18776574ceb0023bfa373dddc4601252776b72 /application/dialogs/NewInstanceDialog.cpp
parentb795ad52099562a90b961e2e294daf6a3dc00883 (diff)
downloadMultiMC-432ec7417499c6fa6b0c2935c96ad5f3d1d097c1.tar
MultiMC-432ec7417499c6fa6b0c2935c96ad5f3d1d097c1.tar.gz
MultiMC-432ec7417499c6fa6b0c2935c96ad5f3d1d097c1.tar.lz
MultiMC-432ec7417499c6fa6b0c2935c96ad5f3d1d097c1.tar.xz
MultiMC-432ec7417499c6fa6b0c2935c96ad5f3d1d097c1.zip
GH-1404 allow deleting groups and creating instances in groups directly using context menu
Diffstat (limited to 'application/dialogs/NewInstanceDialog.cpp')
-rw-r--r--application/dialogs/NewInstanceDialog.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/application/dialogs/NewInstanceDialog.cpp b/application/dialogs/NewInstanceDialog.cpp
index 0d54172d..a883d1dc 100644
--- a/application/dialogs/NewInstanceDialog.cpp
+++ b/application/dialogs/NewInstanceDialog.cpp
@@ -55,7 +55,7 @@ public:
}
};
-NewInstanceDialog::NewInstanceDialog(QWidget *parent)
+NewInstanceDialog::NewInstanceDialog(const QString & initialGroup, QWidget *parent)
: QDialog(parent), ui(new Ui::NewInstanceDialog)
{
ui->setupUi(this);
@@ -79,11 +79,10 @@ NewInstanceDialog::NewInstanceDialog(QWidget *parent)
auto groupList = QStringList(groups.toList());
groupList.sort(Qt::CaseInsensitive);
groupList.removeOne("");
- QString oldValue = MMC->settings()->get("LastUsedGroupForNewInstance").toString();
- groupList.push_front(oldValue);
+ groupList.push_front(initialGroup);
groupList.push_front("");
ui->groupBox->addItems(groupList);
- int index = groupList.indexOf(oldValue);
+ int index = groupList.indexOf(initialGroup);
if(index == -1)
{
index = 0;