Merge lp:~michael-sheldon/ubuntu-ui-toolkit/fix-1409027 into lp:ubuntu-ui-toolkit/staging

Proposed by Michael Sheldon
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1377
Merged at revision: 1379
Proposed branch: lp:~michael-sheldon/ubuntu-ui-toolkit/fix-1409027
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 12 lines (+1/-1)
1 file modified
modules/Ubuntu/Components/OrientationHelper.qml (+1/-1)
To merge this branch: bzr merge lp:~michael-sheldon/ubuntu-ui-toolkit/fix-1409027
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Zsombor Egri Approve
Daniel d'Andrada (community) Approve
Review via email: mp+245963@code.launchpad.net

Commit message

Only use stableOrientationAngleTimer in the OrientationHelper when the orientationAngle has been set automatically

Description of the change

Only use stableOrientationAngleTimer in the OrientationHelper when the orientationAngle has been set automatically

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Looks good to me and fixes bug 1409027

review: Approve
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

A more sound improvement would be to update the public OrientationHelper.orientationAngle only once we decide to do the rotation. Effectively moving "Screen.angleBetween(Screen.primaryOrientation, Screen.orientation)" to a private property. But that's a higher impact change which is not needed at the moment.

Revision history for this message
Zsombor Egri (zsombi) wrote :

Good to go, thanks!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/OrientationHelper.qml'
2--- modules/Ubuntu/Components/OrientationHelper.qml 2014-12-15 12:20:25 +0000
3+++ modules/Ubuntu/Components/OrientationHelper.qml 2015-01-09 14:47:21 +0000
4@@ -87,7 +87,7 @@
5 // Screen.primaryOrientation and Screen.orientation can change one right after the other,
6 // causing orientationAngle to momentarily change. To avoid responding to such
7 // intermediate states, wait for its value to stabilize before rotating to it.
8- onOrientationAngleChanged: { stableOrientationAngleTimer.restart(); }
9+ onOrientationAngleChanged: { automaticOrientation ? stableOrientationAngleTimer.restart() : d.tryUpdateState(); }
10
11 /*!
12 The property holds if the OrientationHelper should automatically resize the

Subscribers

People subscribed via source and target branches