author | zautrix <zautrix> | 2005-07-05 05:29:02 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-05 05:29:02 (UTC) |
commit | 5992ea9025ebddde8be72322c90aac8edeaf4d1c (patch) (side-by-side diff) | |
tree | f0d9385d80fe74af453aa23fd69715d66aeaee12 /korganizer/koagenda.cpp | |
parent | 671d832454c8b68e0bb44e439f28fb1c768e033d (diff) | |
download | kdepimpi-5992ea9025ebddde8be72322c90aac8edeaf4d1c.zip kdepimpi-5992ea9025ebddde8be72322c90aac8edeaf4d1c.tar.gz kdepimpi-5992ea9025ebddde8be72322c90aac8edeaf4d1c.tar.bz2 |
rf
-rw-r--r-- | korganizer/koagenda.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 01cef35..0280c74 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -1621,98 +1621,100 @@ KOAgendaItem *KOAgenda::getNewItem(Incidence * event,QDate qd, QWidget* view) KOAgendaItem* agendaItem = new KOAgendaItem( event, qd, view, mAllDayMode ); agendaItem->installEventFilter(this); addChild(agendaItem,0,0); return agendaItem; } KOAgendaItem * KOAgenda::getItemForTodo ( Todo * todo ) { KOAgendaItem *item; for ( item=mItems.first(); item != 0; item=mItems.next() ) { if ( item->incidence() == todo ) { mItems.remove(); return item; } } return 0; } void KOAgenda::updateTodo( Todo * todo, int days, bool remove) { // ( todo->hasCompletedDate() && todo->completed().date() == currentDate )|| KOAgendaItem *item; item = getItemForTodo ( todo ); //qDebug("KOAgenda::updateTodo %d %d %d %d", this, todo, days, remove); if ( item ) { blockSignals( true ); //qDebug("item found "); item->hide(); item->setCellX(-2, -1 ); item->select(false); mUnusedItems.append( item ); mItems.remove( item ); QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); KOAgendaItem *itemit; //globalFlagBlockAgendaItemPaint = 1; for ( itemit=oldconflictItems.first(); itemit != 0; itemit=oldconflictItems.next() ) { if ( itemit != item ) placeSubCells(itemit); } qApp->processEvents(); //globalFlagBlockAgendaItemPaint = 0; for ( itemit=oldconflictItems.first(); itemit != 0; itemit=oldconflictItems.next() ) { globalFlagBlockAgendaItemUpdate = 0; if ( itemit != item ) itemit->repaintMe(); - globalFlagBlockAgendaItemUpdate = 1; - itemit->repaint(); + globalFlagBlockAgendaItemUpdate = 1; + //qDebug("sigleshot "); + QTimer::singleShot( 0, itemit, SLOT ( repaintItem() )); + //itemit->repaint( false ); repaintItem() } blockSignals( false ); } if ( remove ) { //qDebug("remove****************************************** "); return; } if ( todo->hasCompletedDate() && !KOPrefs::instance()->mShowCompletedTodoInAgenda ) return; //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ "); QDate currentDate = QDate::currentDate(); bool overdue = (!todo->isCompleted()) && (todo->dtDue() < currentDate)&& ( KOPrefs::instance()->mShowTodoInAgenda ); QDateTime dt; if ( todo->hasCompletedDate() ) dt = todo->completed(); else dt = todo->dtDue(); if ( overdue ) { days += todo->dtDue().date().daysTo( currentDate ); } else currentDate = dt.date(); if (( todo->doesFloat() || overdue) && !todo->hasCompletedDate() ) { if ( ! mAllDayMode ) return; // aldayagenda globalFlagBlockAgendaItemPaint = 1; item = insertAllDayItem(todo, currentDate,days, days); item->show(); } else { if ( mAllDayMode ) return; // mAgenda globalFlagBlockAgendaItemPaint = 1; int endY = timeToY(dt.time()) - 1; int hi = 12/KOPrefs::instance()->mHourSize; int startY = endY - 1-hi; item = insertItem(todo,currentDate,days,startY,endY); item->show(); } qApp->processEvents(); globalFlagBlockAgendaItemPaint = 0; QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); KOAgendaItem *itemit; for ( itemit=oldconflictItems.first(); itemit != 0; itemit=oldconflictItems.next() ) { globalFlagBlockAgendaItemUpdate = 0; |