summaryrefslogtreecommitdiffstats
path: root/gui/groupview/GroupView.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-02-10 00:51:52 +0100
committerPetr Mrázek <peterix@gmail.com>2014-02-10 00:51:52 +0100
commit5a0e7877b05d656741042d6a47afd6cf1d0fc6ae (patch)
tree3f061297b607bc5d47eb827bd55c5258a583556a /gui/groupview/GroupView.h
parent2f0275c194bbd49714185cab395d4642b43d385c (diff)
downloadMultiMC-5a0e7877b05d656741042d6a47afd6cf1d0fc6ae.tar
MultiMC-5a0e7877b05d656741042d6a47afd6cf1d0fc6ae.tar.gz
MultiMC-5a0e7877b05d656741042d6a47afd6cf1d0fc6ae.tar.lz
MultiMC-5a0e7877b05d656741042d6a47afd6cf1d0fc6ae.tar.xz
MultiMC-5a0e7877b05d656741042d6a47afd6cf1d0fc6ae.zip
Fix groupview issues
* indexAt was using the wrong coordinate system * model events now trigger a delayed layout update instead of immediate.
Diffstat (limited to 'gui/groupview/GroupView.h')
-rw-r--r--gui/groupview/GroupView.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gui/groupview/GroupView.h b/gui/groupview/GroupView.h
index 329a3503..e8f9107c 100644
--- a/gui/groupview/GroupView.h
+++ b/gui/groupview/GroupView.h
@@ -24,9 +24,12 @@ public:
GroupView(QWidget *parent = 0);
~GroupView();
+ /// return geometry rectangle occupied by the specified model item
QRect geometryRect(const QModelIndex &index) const;
+ /// return visual rectangle occupied by the specified model item
virtual QRect visualRect(const QModelIndex &index) const override;
- QModelIndex indexAt(const QPoint &point) const;
+ /// get the model index at the specified visual point
+ virtual QModelIndex indexAt(const QPoint &point) const override;
void setSelection(const QRect &rect,
const QItemSelectionModel::SelectionFlags commands) override;
@@ -114,6 +117,7 @@ private slots:
void endCategoryEditor();*/
private: /* variables */
+ /// point where the currently active mouse action started in geometry coordinates
QPoint m_pressedPosition;
QPersistentModelIndex m_pressedIndex;
bool m_pressedAlreadySelected;