From 31393a99cd2b190e62a7a09a7739a14af83936d1 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 17 Aug 2005 12:04:19 +0000 Subject: fixed warnings --- (limited to 'korganizer/koagendaview.cpp') diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index f5a3a4b..1cf03a0 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -1002,11 +1002,12 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) int xxx = item->cellX(); //qDebug("KOAgendaView::updateEventDates %d %d %d %d %d", xxx, mMinY.at(xxx),mMaxY.at(xxx),item->cellYTop(),item->cellYBottom() ); - if ( mMinY.at(xxx) > item->cellYTop() ) - mMinY.at(xxx) = item->cellYTop(); - if ( mMaxY.at(xxx) < item->cellYBottom() ) - mMaxY.at(xxx) = item->cellYBottom(); - + if ( xxx >= 0 && xxx < mMinY.count() && !item->isAllDay() ) { + if ( mMinY.at(xxx) > item->cellYTop() ) + mMinY.at(xxx) = item->cellYTop(); + if ( mMaxY.at(xxx) < item->cellYBottom() ) + mMaxY.at(xxx) = item->cellYBottom(); + } QDateTime startDt,endDt; QDate startDate; int lenInSecs; -- cgit v0.9.0.2