#include <TDataStd_Comment.hxx>
#include <TDF_ChildIDIterator.hxx>
+#include <climits>
+
static const int UNDO_LIMIT = 10; // number of possible undo operations
static const int TAG_GENERAL = 1; // general properties tag
}
// 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()) {
TDF_ChildIDIterator aFLabIter(
aGroupsIter.Value()->Label(), TDataStd_Comment::GetID(), Standard_False);
while(aFIter != aFeatures.end() || aFLabIter.More()) {
- static const int INFINITE_TAG = MAXINT; // no label means that it exists somwhere in infinite
+ static const int INFINITE_TAG = INT_MAX; // no label means that it exists somwhere in infinite
int aFeatureTag = INFINITE_TAG;
if (aFIter != aFeatures.end()) { // existing tag for feature
shared_ptr<Model_Data> aData = dynamic_pointer_cast<Model_Data>((*aFIter)->data());