summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp14
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
@@ -739,9 +739,17 @@ int MonthViewCell::insertEvent(Event *event)
text = time + event->summary();
+
+ int dur = 0;
+ if ( event->doesFloat() ) {
+ dur = event->dtStart().daysTo(event->dtEnd())+1;
+
+ }
if ( useToolTips ) {
mToolTipText += prefix + text;
- if ( event->doesFloat() ) {
- mToolTipText += i18n(" (Duration: %1 days)" ).arg ( event->dtStart().daysTo(event->dtEnd())+1);
-
+ if ( dur ) {
+ mToolTipText += i18n(" (Duration: %1 days)" ).arg ( dur );
}
}
+ if ( dur ) {
+ text += " ("+ QString::number( dur ) + i18n(" days" ) + ")";
+ }
} else {