projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Compile fix.
[wxWidgets.git]
/
wxPython
/
wx
/
lib
/
analogclock
/
helpers.py
diff --git
a/wxPython/wx/lib/analogclock/helpers.py
b/wxPython/wx/lib/analogclock/helpers.py
index 30c66066fbda7f82f63357cbfbb99d800ec86ea7..c459067d586e256f3e5ec398f0901a6674989fb7 100644
(file)
--- a/
wxPython/wx/lib/analogclock/helpers.py
+++ b/
wxPython/wx/lib/analogclock/helpers.py
@@
-479,11
+479,13
@@
class HandSet:
idx = ends[i]
# Is this the hours hand?
if i == 0:
idx = ends[i]
# Is this the hours hand?
if i == 0:
- idx = idx * 5 + ends[1] / 12
- # Adjust idx offset and prevent exceptions on leap seconds.
- idx = idx - 1
- if idx < 0 or idx > 59:
+ idx = idx * 5 + ends[1] / 12 - 1
+ # else prevent exceptions on leap seconds
+ elif idx <= 0 or idx > 60:
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))
hand.dyer.Select(dc, shadow)
angle = math.radians(180 - 6 * (idx + 1))
hand.dyer.Select(dc, shadow)