aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquicksplitview_p_p.h
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-02-25 15:25:35 +0100
committerMitch Curtis <mitch.curtis@qt.io>2020-03-13 10:59:11 +0100
commit8a442c3b7709424c768a99b304bdbdbac81f8011 (patch)
tree7cc92a2b8af719cb4a8137baecbfe10d5ae498d3 /src/quicktemplates2/qquicksplitview_p_p.h
parent6cdd4b53031de17b36b30b00de0a6945470a35ad (diff)
SplitView: fix hidden items causing visible items to not be resizable
When a handle is dragged, the items on either side of it are resized. Until this patch, we were assuming that the item after the one at the handle index was visible, which was wrong. Now we iterate through each item after the one at the pressed index until we find one that's visible. Since we need this in a few other places during a handle drag, we cache it as a member variable. This patch also fixes an issue where the visibility of handles were not updated after setting a new handle delegate. Change-Id: Icd246abae2ed4dc6c3b81217b9a241b7e4debf7d Fixes: QTBUG-81867 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquicksplitview_p_p.h')
-rw-r--r--src/quicktemplates2/qquicksplitview_p_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquicksplitview_p_p.h b/src/quicktemplates2/qquicksplitview_p_p.h
index ccefe5ec..2430eac1 100644
--- a/src/quicktemplates2/qquicksplitview_p_p.h
+++ b/src/quicktemplates2/qquicksplitview_p_p.h
@@ -112,6 +112,7 @@ public:
QVector<QQuickItem*> m_handleItems;
int m_hoveredHandleIndex = -1;
int m_pressedHandleIndex = -1;
+ int m_nextVisibleIndexAfterPressedHandle = -1;
QPointF m_pressPos;
QPointF m_mousePos;
QPointF m_handlePosBeforePress;