summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2013-09-18 22:11:42 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 13:30:17 +0200
commit2aa8ea6850087680af18e14d93bfe40a894607a5 (patch)
treed04427fe850762ac541759b6cbabdca6cfa56891
parent1a1b0d51517a91c97ada8c713479caa0008309a8 (diff)
downloadqtquickcontrols-2aa8ea6850087680af18e14d93bfe40a894607a5.tar.gz
ComboBox: Fix selected item alignment
We seem to receive a size change later that we used to, and this exposed a bug were the popup would always be aligned on the first item. Change-Id: I7b7b4ca5fcff969c3b492419cab7447170a2c3f5 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
-rw-r--r--src/controls/qquickmenupopupwindow.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/controls/qquickmenupopupwindow.cpp b/src/controls/qquickmenupopupwindow.cpp
index a1839296..d21bd0d5 100644
--- a/src/controls/qquickmenupopupwindow.cpp
+++ b/src/controls/qquickmenupopupwindow.cpp
@@ -193,6 +193,7 @@ void QQuickMenuPopupWindow::updateSize()
void QQuickMenuPopupWindow::updatePosition()
{
QPointF newPos = position() + m_oldItemPos - m_itemAt->position();
+ m_initialPos += m_oldItemPos - m_itemAt->position();
setGeometry(newPos.x(), newPos.y(), width(), height());
}