author | zautrix <zautrix> | 2005-07-02 09:22:13 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-02 09:22:13 (UTC) |
commit | cf243d3d9faa7d79eb706f6e70c8d01926e9da89 (patch) (unidiff) | |
tree | ccacd0631c1e850ad1d1f7ae5d740d11bcaf35a3 /korganizer | |
parent | 58a4e6e5dcc24e2f5c17ef9f0e6879d625b5f764 (diff) | |
download | kdepimpi-cf243d3d9faa7d79eb706f6e70c8d01926e9da89.zip kdepimpi-cf243d3d9faa7d79eb706f6e70c8d01926e9da89.tar.gz kdepimpi-cf243d3d9faa7d79eb706f6e70c8d01926e9da89.tar.bz2 |
todo view fix
-rw-r--r-- | korganizer/kotodoview.cpp | 26 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 1 |
2 files changed, 17 insertions, 10 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 8d354c8..e2966f8 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -750,3 +750,2 @@ void KOTodoView::updateView() | |||
750 | } | 750 | } |
751 | storeCurrentItem(); | ||
752 | //qDebug("KOTodoView::updateView() %x", this); | 751 | //qDebug("KOTodoView::updateView() %x", this); |
@@ -754,5 +753,5 @@ void KOTodoView::updateView() | |||
754 | displayAllFlat(); | 753 | displayAllFlat(); |
755 | resetCurrentItem(); | ||
756 | return; | 754 | return; |
757 | } | 755 | } |
756 | storeCurrentItem(); | ||
758 | //qDebug("update "); | 757 | //qDebug("update "); |
@@ -837,3 +836,2 @@ void KOTodoView::updateView() | |||
837 | resetCurrentItem(); | 836 | resetCurrentItem(); |
838 | processSelectionChange(); | ||
839 | } | 837 | } |
@@ -862,3 +860,3 @@ void KOTodoView::resetCurrentItem() | |||
862 | { | 860 | { |
863 | mTodoListView->setFocus(); | 861 | //mTodoListView->setFocus(); |
864 | KOTodoViewItem* foundItem = 0; | 862 | KOTodoViewItem* foundItem = 0; |
@@ -898,8 +896,18 @@ void KOTodoView::resetCurrentItem() | |||
898 | if ( foundItem ) { | 896 | if ( foundItem ) { |
897 | mTodoListView->setSelected ( foundItem, true ); | ||
899 | mTodoListView->setCurrentItem( foundItem ); | 898 | mTodoListView->setCurrentItem( foundItem ); |
900 | mTodoListView->ensureItemVisible( foundItem ); | 899 | mTodoListView->ensureItemVisible( foundItem ); |
901 | } else { | 900 | } else { |
902 | mTodoListView->setCurrentItem( mTodoListView->firstChild () ); | 901 | if ( mTodoListView->firstChild () ) { |
902 | mTodoListView->setSelected ( mTodoListView->firstChild (), true ); | ||
903 | mTodoListView->setCurrentItem( mTodoListView->firstChild () ); | ||
904 | } | ||
903 | } | 905 | } |
904 | } | 906 | } |
907 | processSelectionChange(); | ||
908 | QTimer::singleShot( 100, this, SLOT ( resetFocusToList() )); | ||
909 | } | ||
910 | void KOTodoView::resetFocusToList() | ||
911 | { | ||
912 | topLevelWidget()->setActiveWindow(); | ||
905 | mTodoListView->setFocus(); | 913 | mTodoListView->setFocus(); |
@@ -1406,2 +1414,3 @@ void KOTodoView::displayAllFlat() | |||
1406 | { | 1414 | { |
1415 | storeCurrentItem(); | ||
1407 | pendingSubtodo = 0; | 1416 | pendingSubtodo = 0; |
@@ -1420,4 +1429,3 @@ void KOTodoView::displayAllFlat() | |||
1420 | } | 1429 | } |
1421 | mTodoListView->setFocus(); | 1430 | resetCurrentItem(); |
1422 | processSelectionChange(); | ||
1423 | } | 1431 | } |
@@ -1432,5 +1440,3 @@ void KOTodoView::setAllFlat() | |||
1432 | } | 1440 | } |
1433 | storeCurrentItem(); | ||
1434 | displayAllFlat(); | 1441 | displayAllFlat(); |
1435 | resetCurrentItem(); | ||
1436 | } | 1442 | } |
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 1b31d0d..9ae7f53 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -226,2 +226,3 @@ class KOTodoView : public KOrg::BaseView | |||
226 | void itemDoubleClicked(QListViewItem *item); | 226 | void itemDoubleClicked(QListViewItem *item); |
227 | void resetFocusToList(); | ||
227 | 228 | ||