summaryrefslogtreecommitdiffstats
path: root/gui/groupview/GroupView.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-07-12 12:49:07 +0200
committerPetr Mrázek <peterix@gmail.com>2014-07-12 12:49:07 +0200
commitd570037331f68f77eb010e65fa41129074123318 (patch)
tree4c36bbc8008bdb5010538c04e922182cc5f29c4b /gui/groupview/GroupView.h
parent6a8984a21d5ab7b20821c8c6624e135c1a4c9e34 (diff)
downloadMultiMC-d570037331f68f77eb010e65fa41129074123318.tar
MultiMC-d570037331f68f77eb010e65fa41129074123318.tar.gz
MultiMC-d570037331f68f77eb010e65fa41129074123318.tar.lz
MultiMC-d570037331f68f77eb010e65fa41129074123318.tar.xz
MultiMC-d570037331f68f77eb010e65fa41129074123318.zip
Cache group view geometry -- speed up instance view by caching sizes of stuff
Diffstat (limited to 'gui/groupview/GroupView.h')
-rw-r--r--gui/groupview/GroupView.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gui/groupview/GroupView.h b/gui/groupview/GroupView.h
index b3ab5357..736bfbeb 100644
--- a/gui/groupview/GroupView.h
+++ b/gui/groupview/GroupView.h
@@ -3,6 +3,7 @@
#include <QListView>
#include <QLineEdit>
#include <QScrollBar>
+#include <QCache>
struct GroupViewRoles
{
@@ -128,6 +129,7 @@ private: /* variables */
QItemSelectionModel::SelectionFlag m_ctrlDragSelectionFlag;
QPoint m_lastDragPosition;
int m_spacing = 5;
+ QCache<int, QRect> geometryCache;
private: /* methods */
QPair<int, int> categoryInternalPosition(const QModelIndex &index) const;