summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp13
-rw-r--r--korganizer/kotodoview.h2
2 files changed, 13 insertions, 2 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()
mCurItemRootParent = 0;
+ mCurItemParent = 0;
mCurItemAbove = 0;
@@ -741,2 +742,3 @@ void KOTodoView::storeCurrentItem()
mCurItemRootParent = mCurItem;
+ mCurItemParent = mCurItemRootParent->relatedTo();
while ( mCurItemRootParent->relatedTo() != 0 )
@@ -752,2 +754,3 @@ void KOTodoView::resetCurrentItem()
KOTodoViewItem* foundItemRoot = 0;
+ KOTodoViewItem* foundItemParent = 0;
KOTodoViewItem* foundItemAbove = 0;
@@ -763,5 +766,9 @@ void KOTodoView::resetCurrentItem()
- } else if ( item->todo() == mCurItemRootParent ) {
+ }
+ if ( item->todo() == mCurItemRootParent ) {
foundItemRoot = item;
}
+ if ( item->todo() == mCurItemParent ) {
+ foundItemParent = item;
+ }
item = (KOTodoViewItem*)item->itemBelow();
@@ -769,2 +776,5 @@ void KOTodoView::resetCurrentItem()
if ( ! foundItem ) {
+ if ( foundItemParent ) {
+ foundItem = foundItemParent;
+ } else {
if ( foundItemRoot )
@@ -775,2 +785,3 @@ void KOTodoView::resetCurrentItem()
}
+ }
if ( foundItem ) {
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
void resetCurrentItem();
- Incidence * mCurItem, *mCurItemRootParent,*mCurItemAbove;
+ Incidence * mCurItem, *mCurItemRootParent, *mCurItemParent,*mCurItemAbove;
};