Patch for [ 1489711 ] analogclock hour hand sticks on 12:00 noon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -479,11 +479,13 @@ class HandSet:
|
|||||||
idx = ends[i]
|
idx = ends[i]
|
||||||
# Is this the hours hand?
|
# Is this the hours hand?
|
||||||
if i == 0:
|
if i == 0:
|
||||||
idx = idx * 5 + ends[1] / 12
|
idx = idx * 5 + ends[1] / 12 - 1
|
||||||
# Adjust idx offset and prevent exceptions on leap seconds.
|
# else prevent exceptions on leap seconds
|
||||||
idx = idx - 1
|
elif idx <= 0 or idx > 60:
|
||||||
if idx < 0 or idx > 59:
|
|
||||||
idx = 59
|
idx = 59
|
||||||
|
# and adjust idx offset for minutes and non-leap seconds
|
||||||
|
else:
|
||||||
|
idx = idx - 1
|
||||||
angle = math.radians(180 - 6 * (idx + 1))
|
angle = math.radians(180 - 6 * (idx + 1))
|
||||||
|
|
||||||
hand.dyer.Select(dc, shadow)
|
hand.dyer.Select(dc, shadow)
|
||||||
|
Reference in New Issue
Block a user