Fix axis locking for AutoFlickDirection
authorAndras Becsi <andras.becsi@nokia.com>
Thu, 10 May 2012 13:12:18 +0000 (15:12 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 11 May 2012 09:46:25 +0000 (11:46 +0200)
commit1b0d246fb49e408afaed817694ce91aaf52b180b
tree721ec09bffe0a77207b4454cd5b76bc5cae66b79
parentcf6926229f99fb7caeabd3f3ea19fe86d7a59ee9
Fix axis locking for AutoFlickDirection

If the flickableDirection property is AutoFlickDirection Flickable
compares qreals for equality to decide whether to lock flicking in one
direction. This is too restrictive since the content size could have
rounding errors withing the one pixel range resulting from pixel
alignment and float calculations.

Flickable should consider the content width/height equal to its
width/height if their difference is within the one pixel range.

Change-Id: Id3bff33d6f798860c62c699a6c2795213efe233d
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/quick/items/qquickflickable.cpp