-rw-r--r-- | korganizer/kojournalview.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp index 0523954..a23a3b2 100644 --- a/korganizer/kojournalview.cpp +++ b/korganizer/kojournalview.cpp @@ -147,86 +147,90 @@ void KOJournalView::newJournal() { //qDebug(" KOJournalView::newJournal()"); flushView(); Journal* mJournal = new Journal; mJournal->setDtStart(QDateTime(mDate,QTime(0,0,0))); mCalendar->addJournal(mJournal); showDates( mDate, QDate() ); } void KOJournalView::showOnly ( Journal* j ) { //qDebug("showOnly %x ", j); flushView(); if ( j == 0 ) { showDates( mDate, QDate() ); return; } QPtrList<Journal> jl; jl.append ( j ); showList( jl ); JournalEntry* mEntry = jEntries.first(); mEntry->setShowOnly(); } void KOJournalView::showList(QPtrList<Journal> jl) -{ +{ + static bool ff = false; + if ( ff ) return; + ff = true; //qDebug("KOJournalView::showList %d",jl.count() ); JournalEntry* mEntry = jEntries.first(); JournalEntry* firstEntry = mEntry; int count = jl.count(); int iii = 0; while ( iii < count ) { if ( !mEntry ) { mEntry = getNewEntry(); mEntry->setVisibleMode( true ); mEntry->setDate(mDate); mEntry->setJournal(jl.at(iii), false); mEntry->setVisibleMode( true ); mEntry->show(); mEntry = 0; } else { mEntry->setVisibleMode( true ); mEntry->setDate(mDate); mEntry->setJournal(jl.at(iii), false); mEntry->setVisibleMode( true ); mEntry->show(); mEntry = jEntries.next(); } ++iii; } while ( mEntry ) { mEntry->setDate(mDate); mEntry->clear(); if ( mEntry != firstEntry ) { mEntry->hide(); mEntry->setVisibleMode( false ); } else { mEntry->setVisibleMode( true ); mEntry->show(); } mEntry = jEntries.next(); } + ff = false; } void KOJournalView::showDates(const QDate &start, const QDate &) { mDate = start; mDateLabel->setText(KGlobal::locale()->formatDate(mDate)); QPtrList<Journal> jl = calendar()->journals4Date( start ); showList( jl ); } void KOJournalView::showEvents(QPtrList<Event>) { // After new creation of list view no events are selected. // emit incidenceSelected( 0 ); } void KOJournalView::changeEventDisplay(Event *, int /*action*/) { updateView(); } void KOJournalView::keyPressEvent ( QKeyEvent * e ) { //qDebug("keyPressEven "); |