Need to check new rotation against initial rotation instead of current

Only swap width/height of initial geometry if orthogonal to initial
rotation not orthogonal to current rotation

Change-Id: I825954e98dee6c0d07a284307dfb8e1f9fd538e6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
This commit is contained in:
Kevin Krammer 2012-03-21 13:01:55 +01:00 committed by Qt by Nokia
parent 3f3dd8f1d3
commit f900da7582

View File

@ -207,7 +207,7 @@ void QQnxScreen::setRotation(int rotation)
m_rootWindow->setRotation(rotation);
// Swap dimensions if we've rotated 90 or 270 from initial orientation
if (isOrthogonal(m_currentRotation, rotation)) {
if (isOrthogonal(m_initialRotation, rotation)) {
m_currentGeometry = QRect(0, 0, m_initialGeometry.height(), m_initialGeometry.width());
m_currentPhysicalSize = QSize(m_initialPhysicalSize.height(), m_initialPhysicalSize.width());
} else {