summaryrefslogtreecommitdiffstats
path: root/application/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'application/dialogs')
-rw-r--r--application/dialogs/NewInstanceDialog.cpp7
-rw-r--r--application/dialogs/NewInstanceDialog.h2
2 files changed, 4 insertions, 5 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;
diff --git a/application/dialogs/NewInstanceDialog.h b/application/dialogs/NewInstanceDialog.h
index 1a2be10c..578b2c45 100644
--- a/application/dialogs/NewInstanceDialog.h
+++ b/application/dialogs/NewInstanceDialog.h
@@ -29,7 +29,7 @@ class NewInstanceDialog : public QDialog
Q_OBJECT
public:
- explicit NewInstanceDialog(QWidget *parent = 0);
+ explicit NewInstanceDialog(const QString & initialGroup, QWidget *parent = 0);
~NewInstanceDialog();
void updateDialogState();