summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp21
-rw-r--r--korganizer/kotodoview.h2
2 files changed, 17 insertions, 6 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 395325c..935a5f5 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -733,2 +733,3 @@ void KOTodoView::storeCurrentItem()
733 mCurItemRootParent = 0; 733 mCurItemRootParent = 0;
734 mCurItemParent = 0;
734 mCurItemAbove = 0; 735 mCurItemAbove = 0;
@@ -741,2 +742,3 @@ void KOTodoView::storeCurrentItem()
741 mCurItemRootParent = mCurItem; 742 mCurItemRootParent = mCurItem;
743 mCurItemParent = mCurItemRootParent->relatedTo();
742 while ( mCurItemRootParent->relatedTo() != 0 ) 744 while ( mCurItemRootParent->relatedTo() != 0 )
@@ -752,2 +754,3 @@ void KOTodoView::resetCurrentItem()
752 KOTodoViewItem* foundItemRoot = 0; 754 KOTodoViewItem* foundItemRoot = 0;
755 KOTodoViewItem* foundItemParent = 0;
753 KOTodoViewItem* foundItemAbove = 0; 756 KOTodoViewItem* foundItemAbove = 0;
@@ -763,5 +766,9 @@ void KOTodoView::resetCurrentItem()
763 766
764 } else if ( item->todo() == mCurItemRootParent ) { 767 }
768 if ( item->todo() == mCurItemRootParent ) {
765 foundItemRoot = item; 769 foundItemRoot = item;
766 } 770 }
771 if ( item->todo() == mCurItemParent ) {
772 foundItemParent = item;
773 }
767 item = (KOTodoViewItem*)item->itemBelow(); 774 item = (KOTodoViewItem*)item->itemBelow();
@@ -769,6 +776,10 @@ void KOTodoView::resetCurrentItem()
769 if ( ! foundItem ) { 776 if ( ! foundItem ) {
770 if ( foundItemRoot ) 777 if ( foundItemParent ) {
771 foundItem = foundItemRoot; 778 foundItem = foundItemParent;
772 else 779 } else {
773 foundItem = foundItemAbove; 780 if ( foundItemRoot )
781 foundItem = foundItemRoot;
782 else
783 foundItem = foundItemAbove;
784 }
774 } 785 }
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 39976cf..d0788a9 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -259,3 +259,3 @@ class KOTodoView : public KOrg::BaseView
259 void resetCurrentItem(); 259 void resetCurrentItem();
260 Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove; 260 Incidence * mCurItem, *mCurItemRootParent, *mCurItemParent,*mCurItemAbove;
261}; 261};