summaryrefslogtreecommitdiffstats
path: root/application/MainWindow.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2019-08-20 02:58:27 +0200
committerPetr Mrázek <peterix@gmail.com>2019-08-20 02:58:27 +0200
commit1747f413b9d9a515d8ba6f583bba5985bad5636d (patch)
tree3b964f253d0f476fe89c1ff35e6f093cedf270b5 /application/MainWindow.cpp
parent6d975748c0dd9ac89815fe5043c0d89b8e684bc7 (diff)
downloadMultiMC-1747f413b9d9a515d8ba6f583bba5985bad5636d.tar
MultiMC-1747f413b9d9a515d8ba6f583bba5985bad5636d.tar.gz
MultiMC-1747f413b9d9a515d8ba6f583bba5985bad5636d.tar.lz
MultiMC-1747f413b9d9a515d8ba6f583bba5985bad5636d.tar.xz
MultiMC-1747f413b9d9a515d8ba6f583bba5985bad5636d.zip
GH-851 save, load and use group expansion status
Diffstat (limited to 'application/MainWindow.cpp')
-rw-r--r--application/MainWindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index 1db09c6c..8457cd41 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -682,6 +682,10 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow
connect(proxymodel, &InstanceProxyModel::dataChanged, this, &MainWindow::instanceDataChanged);
view->setModel(proxymodel);
+ view->setSourceOfGroupCollapseStatus([](const QString & groupName)->bool {
+ return MMC->instances()->isGroupCollapsed(groupName);
+ });
+ connect(view, &GroupView::groupStateChanged, MMC->instances().get(), &InstanceList::on_GroupStateChanged);
ui->horizontalLayout->addWidget(view);
}
// The cat background