summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index d8a2134..c1b149f 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -716,8 +716,10 @@ void KOAgendaView::createDayLabels()
QFontMetrics fm ( dlf );
dlf.setBold( true );
int selCount = mSelectedDates.count();
int widModulo = maxWid - (mAgenda->gridSpacingX() * selCount)+1;
+ if ( widModulo < 0 || widModulo > selCount )
+ widModulo = 0;
QString dayTest = "Mon 20";
//QString dayTest = "Mon 20";
int wid = fm.width( dayTest );
//maxWid -= ( selCount * 3 ); //working for QLabels