summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtExpandedListView.cpp')
-rw-r--r--Swift/QtUI/QtExpandedListView.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Swift/QtUI/QtExpandedListView.cpp b/Swift/QtUI/QtExpandedListView.cpp
index 8cbfab6..84769c5 100644
--- a/Swift/QtUI/QtExpandedListView.cpp
+++ b/Swift/QtUI/QtExpandedListView.cpp
@@ -10,2 +10,3 @@
#include <QScrollArea>
+#include <QDebug>
@@ -62,8 +63,9 @@ void QtExpandedListView::currentChanged(const QModelIndex &current, const QModel
if (scrollArea) {
+ auto scrollWidget = scrollArea->widget();
QList<QPoint> points;
auto visRect = visualRect(current);
- points << pos() + visRect.topLeft();
- points << pos() + visRect.topRight();
- points << pos() + visRect.bottomLeft();
- points << pos() + visRect.bottomRight();
+ points << mapTo(scrollWidget, visRect.topLeft());
+ points << mapTo(scrollWidget, visRect.topRight());
+ points << mapTo(scrollWidget, visRect.bottomLeft());
+ points << mapTo(scrollWidget, visRect.bottomRight());