summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svtools/source/contnr/treelist.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index 1716e27021c0..f3bf0bc2bf4f 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -1257,6 +1257,8 @@ bool SvTreeList::Remove( const SvTreeListEntry* pEntry )
SvTreeListEntries& rList = pParent->maChildren;
bool bLastEntry = false;
+ Broadcast(LISTACTION_REMOVED, const_cast<SvTreeListEntry*>(pEntry));
+
if ( pEntry->HasChildListPos() )
{
size_t nListPos = pEntry->GetChildListPos();
@@ -1273,7 +1275,6 @@ bool SvTreeList::Remove( const SvTreeListEntry* pEntry )
rList.erase(it);
}
-
// moved to end of method because it is used later with Broadcast
if (!rList.empty() && !bLastEntry)
@@ -1284,9 +1285,7 @@ bool SvTreeList::Remove( const SvTreeListEntry* pEntry )
#ifdef CHECK_INTEGRITY
CheckIntegrity();
#endif
- Broadcast(LISTACTION_REMOVED, const_cast<SvTreeListEntry*>(pEntry));
- delete pEntry; // deletes any children as well
return true;
}