-rw-r--r-- | korganizer/kowhatsnextview.cpp | 4 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 53fe7d0..8473db9 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -189,8 +189,9 @@ 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"); QString ipath;// = new QString(); @@ -317,8 +318,9 @@ void KOWhatsNextView::updateView() while (!gotone && priority<6) { todo = todos.first(); while(todo) { if (!todo->isCompleted() && (todo->priority() == priority) ) { + mCurrentMaxPrio = priority - priosFound + topmostPrios -1; if ( appendTodo(todo) ) gotone = true; } todo = todos.next(); @@ -724,9 +726,9 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) } QPtrList<Incidence> 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 ); } return true; diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h index 715037f..d6727ac 100644 --- a/korganizer/kowhatsnextview.h +++ b/korganizer/kowhatsnextview.h @@ -86,8 +86,9 @@ class KOWhatsNextView : public KOrg::BaseView void restartTimer(); private: + int mCurrentMaxPrio; //void createEventViewer(); QTimer* mTimer; WhatsNextTextBrowser *mView; QString mText; |