-rw-r--r-- | korganizer/komonthview.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 610aae6..85e9166 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -737,12 +737,20 @@ int MonthViewCell::insertEvent(Event *event) } text = time + event->summary(); - if ( useToolTips ) { - mToolTipText += prefix + text; + + int dur = 0; if ( event->doesFloat() ) { - mToolTipText += i18n(" (Duration: %1 days)" ).arg ( event->dtStart().daysTo(event->dtEnd())+1); + dur = event->dtStart().daysTo(event->dtEnd())+1; } + if ( useToolTips ) { + mToolTipText += prefix + text; + if ( dur ) { + mToolTipText += i18n(" (Duration: %1 days)" ).arg ( dur ); + } + } + if ( dur ) { + text += " ("+ QString::number( dur ) + i18n(" days" ) + ")"; } } else { if (event->doesFloat()) { |