diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-03-09 23:46:46 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-03-09 23:46:46 +0100 |
commit | 7fd56a30bd9fba9e0a05f7267e0982be39f00616 (patch) | |
tree | 940f03e6c1ebeaf14844d9b24b7fbcd2fa987709 /gui/groupview/GroupView.cpp | |
parent | b2c803a378695026f12aabc3729eb2139bee1b2c (diff) | |
parent | f1dc4568020d222803d54fdcece324a14c9266c7 (diff) | |
download | MultiMC-7fd56a30bd9fba9e0a05f7267e0982be39f00616.tar MultiMC-7fd56a30bd9fba9e0a05f7267e0982be39f00616.tar.gz MultiMC-7fd56a30bd9fba9e0a05f7267e0982be39f00616.tar.lz MultiMC-7fd56a30bd9fba9e0a05f7267e0982be39f00616.tar.xz MultiMC-7fd56a30bd9fba9e0a05f7267e0982be39f00616.zip |
Merge remote-tracking branch 'origin/feature_commands' into integration_butchery
Diffstat (limited to 'gui/groupview/GroupView.cpp')
-rw-r--r-- | gui/groupview/GroupView.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gui/groupview/GroupView.cpp b/gui/groupview/GroupView.cpp index 5f3e3dec..b650efee 100644 --- a/gui/groupview/GroupView.cpp +++ b/gui/groupview/GroupView.cpp @@ -45,6 +45,12 @@ GroupView::~GroupView() m_groups.clear(); } +void GroupView::setModel(QAbstractItemModel *model) +{ + QAbstractItemView::setModel(model); + connect(model, &QAbstractItemModel::modelReset, this, &GroupView::modelReset); +} + void GroupView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles) { @@ -133,6 +139,12 @@ void GroupView::updateGeometries() viewport()->update(); } +void GroupView::modelReset() +{ + scheduleDelayedItemsLayout(); + executeDelayedItemsLayout(); +} + bool GroupView::isIndexHidden(const QModelIndex &index) const { Group *cat = category(index); |