From afb896709be49326ca9d9ad1656153cc27a60ffe Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 08 Apr 2005 11:56:30 +0000 Subject: wn fix --- diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 53fe7d0..8473db9 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -190,6 +190,7 @@ void KOWhatsNextView::updateView() //qDebug("KOWhatsNextView::updateView() "); if ( mTimer->isActive() ) restartTimer(); + mCurrentMaxPrio = 5; //qDebug("KOWhatsNextView::updateView() "); // mDateLabel->setText(KGlobal::locale()->formatDate(QDate::currentDate())); KIconLoader kil("korganizer"); @@ -318,6 +319,7 @@ void KOWhatsNextView::updateView() todo = todos.first(); while(todo) { if (!todo->isCompleted() && (todo->priority() == priority) ) { + mCurrentMaxPrio = priority - priosFound + topmostPrios -1; if ( appendTodo(todo) ) gotone = true; } @@ -725,7 +727,7 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) QPtrList Relations = ev->relations(); Incidence *to; for (to=Relations.first();to;to=Relations.next()) { - if (!((Todo*)to)->isCompleted()) + if (!((Todo*)to)->isCompleted() && ((Todo*)to)->priority() <= mCurrentMaxPrio ) appendTodo( to, ind , true ); } diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h index 715037f..d6727ac 100644 --- a/korganizer/kowhatsnextview.h +++ b/korganizer/kowhatsnextview.h @@ -87,6 +87,7 @@ class KOWhatsNextView : public KOrg::BaseView private: + int mCurrentMaxPrio; //void createEventViewer(); QTimer* mTimer; WhatsNextTextBrowser *mView; -- cgit v0.9.0.2