summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-08-06 09:54:42 (UTC)
committer zautrix <zautrix>2005-08-06 09:54:42 (UTC)
commitb841f4f2d54ac531c1f9ec88852d31307b9145f2 (patch) (side-by-side diff)
treec334106e75e73bbc3fc33cd3c0d6480314a42774 /korganizer
parentcd215c243d0636cabbc73006652b9b6783319de1 (diff)
downloadkdepimpi-b841f4f2d54ac531c1f9ec88852d31307b9145f2.zip
kdepimpi-b841f4f2d54ac531c1f9ec88852d31307b9145f2.tar.gz
kdepimpi-b841f4f2d54ac531c1f9ec88852d31307b9145f2.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp30
-rw-r--r--korganizer/kotodoview.h2
2 files changed, 23 insertions, 9 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 00c2d97..27d755e 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -505,2 +505,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
{
+ mActiveItem = 0;
mCategoryPopupMenu = 0;
@@ -809,4 +810,14 @@ void KOTodoView::paintEvent(QPaintEvent * pevent)
+void KOTodoView::clearList( bool saveCurrentItem ) // default true
+{
+ if ( mTodoListView->childCount() ) {
+ if ( saveCurrentItem )
+ storeCurrentItem();
+ mTodoListView->clear();
+ mTodoMap.clear();
+ }
+}
void KOTodoView::updateView()
{
+ mActiveItem = 0;
pendingSubtodo = 0;
@@ -816,2 +827,3 @@ void KOTodoView::updateView()
if ( !isVisible() ) {
+ clearList ();
mPendingUpdateBeforeRepaint = true;
@@ -824,3 +836,2 @@ void KOTodoView::updateView()
}
- storeCurrentItem();
//qDebug("update ");
@@ -829,4 +840,4 @@ void KOTodoView::updateView()
+ clearList ();
- mTodoListView->clear();
if ( mName == "todolistsmall" ) {
@@ -866,3 +877,2 @@ void KOTodoView::updateView()
// recursively for proper hierarchical display of Todos.
- mTodoMap.clear();
Todo *todo;
@@ -976,2 +986,3 @@ void KOTodoView::resetCurrentItem()
processSelectionChange();
+ if ( mName != "todolistsmall" )
QTimer::singleShot( 100, this, SLOT ( resetFocusToList() ));
@@ -1102,2 +1113,3 @@ void KOTodoView::editItem(QListViewItem *item )
{
+ if ( item )
emit editTodoSignal(((KOTodoViewItem *)item)->todo());
@@ -1107,2 +1119,3 @@ void KOTodoView::showItem(QListViewItem *item,const QPoint &,int)
{
+ if ( item )
emit showTodoSignal(((KOTodoViewItem *)item)->todo());
@@ -1359,3 +1372,3 @@ void KOTodoView::toggleRunningItem()
tp.exec();
- updateTodo ( t, 0 );
+ updateTodo ( t, KOGlobals::EVENTEDITED );
} else {
@@ -1376,3 +1389,3 @@ void KOTodoView::toggleRunningItem()
t->setRunning( true );
- updateTodo ( t, 0 );
+ updateTodo ( t, KOGlobals::EVENTEDITED );
}
@@ -1507,3 +1520,4 @@ void KOTodoView::displayAllFlat()
{
- storeCurrentItem();
+
+ mActiveItem = 0;
pendingSubtodo = 0;
@@ -1512,2 +1526,3 @@ void KOTodoView::displayAllFlat()
}
+ clearList ();
mPopupMenu->setItemChecked( 8,true );
@@ -1515,4 +1530,2 @@ void KOTodoView::displayAllFlat()
QPtrList<Todo> todoList = calendar()->todos();
- mTodoMap.clear();
- mTodoListView->clear();
Todo *todo;
@@ -1698,2 +1711,3 @@ void KOTodoView::keyPressEvent ( QKeyEvent * e )
}
+
void KOTodoView::updateTodo( Todo * t, int type )
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index a8e90e2..9180015 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -176,3 +176,3 @@ class KOTodoView : public KOrg::BaseView
QString getWhatsThisText(QPoint p);
- void clearList() {mTodoListView->clear(); }
+ void clearList( bool saveCurrentItem = true );