-rw-r--r-- | korganizer/koagenda.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 779f12e..0dd5ef5 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -1635,7 +1635,10 @@ void KOAgenda::setStartHour(int startHour) | |||
1635 | } | 1635 | } |
1636 | QTime KOAgenda::getEndTime() | 1636 | QTime KOAgenda::getEndTime() |
1637 | { | 1637 | { |
1638 | return QTime ( (contentsY ()+viewport()->height())*24/contentsHeight ()+1,0,0); | 1638 | int tim = (contentsY ()+viewport()->height())*24/contentsHeight (); |
1639 | if ( tim > 23 ) | ||
1640 | return QTime ( 23,59,59); | ||
1641 | return QTime ( tim,0,0); | ||
1639 | } | 1642 | } |
1640 | void KOAgenda::hideUnused() | 1643 | void KOAgenda::hideUnused() |
1641 | { | 1644 | { |