From d21e18bf9e691367fa067aa1526ef1b95b702235 Mon Sep 17 00:00:00 2001 From: mpv Date: Fri, 11 Apr 2014 18:38:19 +0400 Subject: [PATCH] Send "delete" event also for deleted group --- src/Model/Model_Document.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Model/Model_Document.cxx b/src/Model/Model_Document.cxx index 03a497213..9049c299d 100644 --- a/src/Model/Model_Document.cxx +++ b/src/Model/Model_Document.cxx @@ -364,9 +364,13 @@ void Model_Document::synchronizeFeatures() } // delete all groups left after the data model groups iteration while(aGroupNamesIter != myGroupsNames.end()) { - myFeatures.erase(*aGroupNamesIter); - myGroups.erase(*aGroupNamesIter); + string aGroupName = *aGroupNamesIter; + myFeatures.erase(aGroupName); + myGroups.erase(aGroupName); aGroupNamesIter = myGroupsNames.erase(aGroupNamesIter); + // say that features were deleted from group + ModelAPI_FeatureDeletedMessage aMsg(aThis, aGroupName); + Event_Loop::loop()->send(aMsg); } // create new groups basing on the following data model update for(; aGroupsIter.More(); aGroupsIter.Next()) { -- 2.39.2