summaryrefslogtreecommitdiffabout
path: root/korganizer/kojournalview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kojournalview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kojournalview.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index cb9a2c0..b659d53 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -121,11 +121,15 @@ void KOJournalView::updateView()
void KOJournalView::flushView()
{
+ static bool ff = false;
+ if ( ff ) return;
+ ff = true;
JournalEntry* mEntry = jEntries.first();
while ( mEntry ) {
mEntry->flushEntry();
mEntry = jEntries.next();
}
+ ff = false;
}
void KOJournalView::clearList()
@@ -138,6 +142,7 @@ void KOJournalView::clearList()
}
void KOJournalView::newJournal()
{
+ //qDebug(" KOJournalView::newJournal()");
flushView();
Journal* mJournal = new Journal;
mJournal->setDtStart(QDateTime(mDate,QTime(0,0,0)));
@@ -147,6 +152,7 @@ void KOJournalView::newJournal()
void KOJournalView::showOnly ( Journal* j )
{
+ //qDebug("showOnly %x ", j);
flushView();
if ( j == 0 ) {
showDates( mDate, QDate() );
@@ -160,6 +166,7 @@ void KOJournalView::showOnly ( Journal* j )
}
void KOJournalView::showList(QPtrList<Journal> jl)
{
+ //qDebug("KOJournalView::showList %d",jl.count() );
JournalEntry* mEntry = jEntries.first();
JournalEntry* firstEntry = mEntry;
int count = jl.count();
@@ -168,13 +175,15 @@ void KOJournalView::showList(QPtrList<Journal> jl)
if ( !mEntry ) {
mEntry = getNewEntry();
mEntry->show();
+ mEntry->setVisibleMode( true );
mEntry->setDate(mDate);
mEntry->setJournal(jl.at(iii));
mEntry = 0;
- } else {
+ } else {
mEntry->setDate(mDate);
mEntry->setJournal(jl.at(iii));
mEntry->show();
+ mEntry->setVisibleMode( true );
mEntry = jEntries.next();
}
++iii;
@@ -182,10 +191,14 @@ void KOJournalView::showList(QPtrList<Journal> jl)
while ( mEntry ) {
mEntry->setDate(mDate);
mEntry->clear();
- if ( mEntry != firstEntry )
+ if ( mEntry != firstEntry ) {
mEntry->hide();
- else
+ mEntry->setVisibleMode( false );
+ }
+ else {
+ mEntry->setVisibleMode( true );
mEntry->show();
+ }
mEntry = jEntries.next();
}
}