diff --git a/launcher/ui/dialogs/ImportResourcePackDialog.cpp b/launcher/ui/dialogs/ImportResourcePackDialog.cpp index 4fe28540b..2b7466052 100644 --- a/launcher/ui/dialogs/ImportResourcePackDialog.cpp +++ b/launcher/ui/dialogs/ImportResourcePackDialog.cpp @@ -8,6 +8,7 @@ #include "InstanceList.h" #include +#include "ui/instanceview/InstanceProxyModel.h" #include "ui/instanceview/InstanceDelegate.h" ImportResourcePackDialog::ImportResourcePackDialog(QWidget* parent) : QDialog(parent), ui(new Ui::ImportResourcePackDialog) @@ -32,7 +33,10 @@ ImportResourcePackDialog::ImportResourcePackDialog(QWidget* parent) : QDialog(pa contentsWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); contentsWidget->setItemDelegate(new ListViewDelegate()); - contentsWidget->setModel(APPLICATION->instances().get()); + proxyModel = new InstanceProxyModel(this); + proxyModel->setSourceModel(APPLICATION->instances().get()); + proxyModel->sort(0); + contentsWidget->setModel(proxyModel); connect(contentsWidget, SIGNAL(doubleClicked(QModelIndex)), SLOT(activated(QModelIndex))); connect(contentsWidget->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), diff --git a/launcher/ui/dialogs/ImportResourcePackDialog.h b/launcher/ui/dialogs/ImportResourcePackDialog.h index b077a811b..8356f204f 100644 --- a/launcher/ui/dialogs/ImportResourcePackDialog.h +++ b/launcher/ui/dialogs/ImportResourcePackDialog.h @@ -3,6 +3,8 @@ #include #include +#include "ui/instanceview/InstanceProxyModel.h" + namespace Ui { class ImportResourcePackDialog; } @@ -13,6 +15,7 @@ class ImportResourcePackDialog : public QDialog { public: explicit ImportResourcePackDialog(QWidget* parent = 0); ~ImportResourcePackDialog(); + InstanceProxyModel* proxyModel; QString selectedInstanceKey; private: diff --git a/launcher/ui/dialogs/ImportResourcePackDialog.ui b/launcher/ui/dialogs/ImportResourcePackDialog.ui index 2a1de0f9b..20cb91770 100644 --- a/launcher/ui/dialogs/ImportResourcePackDialog.ui +++ b/launcher/ui/dialogs/ImportResourcePackDialog.ui @@ -11,9 +11,16 @@ - Pick icon + Choose instance to import + + + + Choose the instance you would like to import this resource pack to. + + +