diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-04-22 06:11:26 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-04-22 06:11:26 +0200 |
commit | 30863a88abbbac05aff914326557882a2f09f4e4 (patch) | |
tree | 262d91987a1e67f3ac1f8fa138b7ac7f9264d469 /application/dialogs | |
parent | 77a1d39f6b623ede3e8ce9245459e0f864a1d176 (diff) | |
download | MultiMC-30863a88abbbac05aff914326557882a2f09f4e4.tar MultiMC-30863a88abbbac05aff914326557882a2f09f4e4.tar.gz MultiMC-30863a88abbbac05aff914326557882a2f09f4e4.tar.lz MultiMC-30863a88abbbac05aff914326557882a2f09f4e4.tar.xz MultiMC-30863a88abbbac05aff914326557882a2f09f4e4.zip |
NOISSUE add pack import using drag&drop
Straight from the browser or the downloads folder.
Diffstat (limited to 'application/dialogs')
-rw-r--r-- | application/dialogs/NewInstanceDialog.cpp | 7 | ||||
-rw-r--r-- | application/dialogs/NewInstanceDialog.h | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/application/dialogs/NewInstanceDialog.cpp b/application/dialogs/NewInstanceDialog.cpp index 8180aa27..d1a2bbfa 100644 --- a/application/dialogs/NewInstanceDialog.cpp +++ b/application/dialogs/NewInstanceDialog.cpp @@ -57,7 +57,7 @@ public: } }; -NewInstanceDialog::NewInstanceDialog(const QString & initialGroup, QWidget *parent) +NewInstanceDialog::NewInstanceDialog(const QString & initialGroup, const QString & url, QWidget *parent) : QDialog(parent), ui(new Ui::NewInstanceDialog) { ui->setupUi(this); @@ -112,6 +112,11 @@ NewInstanceDialog::NewInstanceDialog(const QString & initialGroup, QWidget *pare ui->buttonBox->setFocus(); originalPlaceholderText = ui->instNameTextBox->placeholderText(); + if(!url.isEmpty()) + { + ui->modpackBox->setChecked(true); + ui->modpackEdit->setText(url); + } updateDialogState(); } diff --git a/application/dialogs/NewInstanceDialog.h b/application/dialogs/NewInstanceDialog.h index 1741dab8..000b6a06 100644 --- a/application/dialogs/NewInstanceDialog.h +++ b/application/dialogs/NewInstanceDialog.h @@ -29,7 +29,7 @@ class NewInstanceDialog : public QDialog Q_OBJECT public: - explicit NewInstanceDialog(const QString & initialGroup, QWidget *parent = 0); + explicit NewInstanceDialog(const QString & initialGroup, const QString & url = QString(), QWidget *parent = 0); ~NewInstanceDialog(); void updateDialogState(); |