summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp1
-rw-r--r--korganizer/komonthview.cpp1
-rw-r--r--korganizer/kotodoview.cpp17
-rw-r--r--korganizer/kotodoview.h2
-rw-r--r--korganizer/koviewmanager.cpp13
-rw-r--r--korganizer/koviewmanager.h2
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
@@ -2159,9 +2159,8 @@ 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
@@ -972,8 +972,9 @@ void KOMonthView::updateView()
void KOMonthView::resizeEvent(QResizeEvent * e)
{
computeLayout();
+ mCells[0]->setFocus();
}
void KOMonthView::computeLayout()
{
// select the appropriate heading string size. E.g. "Wednesday" or "Wed".
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 8d8fc2a..82437d8 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -333,8 +333,9 @@ void KOQuickTodo::focusOutEvent(QFocusEvent *ev)
KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
KOrg::BaseView(calendar,parent,name)
{
+ mPendingUpdateBeforeRepaint = false;
isFlatDisplay = false;
mNavigator = 0;
QBoxLayout *topLayout = new QVBoxLayout(this);
mName = QString ( name );
@@ -532,16 +533,28 @@ void KOTodoView::jumpToDate ()
// mActiveItem->todo());
// if ( mActiveItem->todo()->hasDueDate() )
// 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();
return;
}
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 68e29bb..16bc133 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -212,8 +212,10 @@ class KOTodoView : public KOrg::BaseView
* 2. add a public method for setting one todo modified?
* 3. add a private method for setting a todo modified + friend here?
* -- zecke 2002-07-08
*/
+ void paintEvent(QPaintEvent * pevent);
+ bool mPendingUpdateBeforeRepaint;
friend class KOTodoViewItem;
QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo);
void restoreItemState( QListViewItem * );
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 35774d6..2cd8792 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -203,14 +203,14 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
}
if ( mAgendaView ) mAgendaView->deleteSelectedDateTime();
//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;
int wid = mMainView->width() ;
int hei = mMainView->height();
@@ -230,8 +230,11 @@ void KOViewManager::raiseCurrentView( bool fullScreen )
else
wid -= mMainView->leftFrame()->width();
}
emit signalFullScreen( !fullScreen );
+ if ( callUpdateView )
+ mMainView->updateView();
+
if ( globalFlagBlockAgenda == 5 ) {
globalFlagBlockAgenda = 4;
globalFlagBlockAgendaItemPaint = 1;
}
@@ -271,9 +274,9 @@ void KOViewManager::updateView(const QDate &start, const QDate &end)
// kdDebug() << "KOViewManager::updateView()" << endl;
if (mCurrentView) mCurrentView->showDates(start, end);
- if (mTodoView) mTodoView->updateView();
+ if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView();
}
void KOViewManager::updateWNview()
@@ -519,9 +522,11 @@ void KOViewManager::showMonthView()
globalFlagBlockAgenda = 1;
//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());
showView(mMonthView, true );
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index 137eb2d..66ab138 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -67,9 +67,9 @@ class KOViewManager : public QObject
void setDocumentId( const QString & );
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 *);
Incidence *currentSelection();