summaryrefslogtreecommitdiffstats
path: root/korganizer/resourceview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'korganizer/resourceview.cpp')
-rw-r--r--korganizer/resourceview.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/korganizer/resourceview.cpp b/korganizer/resourceview.cpp
index 53b8e6495..112a2801b 100644
--- a/korganizer/resourceview.cpp
+++ b/korganizer/resourceview.cpp
@@ -159,8 +159,10 @@ void ResourceItem::stateChange( bool active )
createSubresourceItems();
}
} else {
- if ( mResource->save() ) mResource->setActive( false );
+ // mView->requestClose must be called before mResource->save() because
+ // save causes closeResource do be called.
mView->requestClose( mResource );
+ if ( mResource->save() ) mResource->setActive( false );
}
setOpen( mResource->isActive() && childCount() > 0 );