-rw-r--r-- | korganizer/calendarview.cpp | 1 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 1 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 17 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 2 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 13 | ||||
-rw-r--r-- | korganizer/koviewmanager.h | 2 |
6 files changed, 28 insertions, 8 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index db33017..cca73f2 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -2161,5 +2161,4 @@ void CalendarView::changeEventDisplay(Event *which, int action) void CalendarView::updateTodoViews() { - mTodoList->updateView(); mViewManager->currentView()->updateView(); diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 4cefb26..770a42b 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -974,4 +974,5 @@ void KOMonthView::resizeEvent(QResizeEvent * e) { computeLayout(); + mCells[0]->setFocus(); } void KOMonthView::computeLayout() diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 8d8fc2a..82437d8 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -335,4 +335,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : KOrg::BaseView(calendar,parent,name) { + mPendingUpdateBeforeRepaint = false; isFlatDisplay = false; mNavigator = 0; @@ -534,12 +535,24 @@ void KOTodoView::jumpToDate () // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); } - +void KOTodoView::paintEvent(QPaintEvent * pevent) +{ + if ( mPendingUpdateBeforeRepaint ) { + updateView(); + mPendingUpdateBeforeRepaint = false; + } + KOrg::BaseView::paintEvent( pevent); +} + bool mPendingUpdateBeforeRepaint; void KOTodoView::updateView() { pendingSubtodo = 0; if ( mBlockUpdate ) { - //qDebug("blocked "); return; } + if ( !isVisible() ) { + mPendingUpdateBeforeRepaint = true; + return; + } + //qDebug("KOTodoView::updateView() %x", this); if ( isFlatDisplay ) { setAllFlat(); diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 68e29bb..16bc133 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h @@ -214,4 +214,6 @@ class KOTodoView : public KOrg::BaseView * -- zecke 2002-07-08 */ + void paintEvent(QPaintEvent * pevent); + bool mPendingUpdateBeforeRepaint; friend class KOTodoViewItem; QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 35774d6..2cd8792 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -205,10 +205,10 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) //raiseCurrentView( full ); mMainView->processIncidenceSelection( 0 ); - mMainView->updateView(); - raiseCurrentView( full ); + //mMainView->updateView(); + raiseCurrentView( full, true ); mMainView->adaptNavigationUnits(); } -void KOViewManager::raiseCurrentView( bool fullScreen ) +void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) { mCurrentAgendaView = 0; @@ -232,4 +232,7 @@ void KOViewManager::raiseCurrentView( bool fullScreen ) } emit signalFullScreen( !fullScreen ); + if ( callUpdateView ) + mMainView->updateView(); + if ( globalFlagBlockAgenda == 5 ) { globalFlagBlockAgenda = 4; @@ -273,5 +276,5 @@ void KOViewManager::updateView(const QDate &start, const QDate &end) if (mCurrentView) mCurrentView->showDates(start, end); - if (mTodoView) mTodoView->updateView(); + if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView(); } @@ -521,5 +524,7 @@ void KOViewManager::showMonthView() //mFlagShowNextxDays = false; // if(mMonthView == mCurrentView) return; + mMainView->dateNavigator()->blockSignals( true ); mMainView->dateNavigator()->selectMonth(); + mMainView->dateNavigator()->blockSignals( false); // DateList tmpList = mMainView->dateNavigator()->selectedDates( ); //mMonthView->showDates(tmpList.first(), tmpList.last()); diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index 137eb2d..66ab138 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h @@ -69,5 +69,5 @@ class KOViewManager : public QObject void updateView( const QDate &start, const QDate &end ); - void raiseCurrentView( bool fullScreen = false ); + void raiseCurrentView( bool fullScreen = false , bool updateView = false); void addView(KOrg::BaseView *); |