Salome HOME
Debug and optimization of selection of elements of the sketch.
[modules/shaper.git] / src / PartSet / PartSet_Tools.cpp
index 16a0d0faaf09c0ab942858d44edc5a4b472be7ea..020c47a27c9ef3b1e01e5ec8f2f90ebc2bd45529 100755 (executable)
@@ -664,7 +664,8 @@ void PartSet_Tools::sendSubFeaturesEvent(const CompositeFeaturePtr& theComposite
     return;
 
   static Events_Loop* aLoop = Events_Loop::loop();
-  for (int i = 0; i < theComposite->numberOfSubs(); i++) {
+  int aNumberOfSubs = theComposite->numberOfSubs();
+  for (int i = 0; i < aNumberOfSubs; i++) {
     FeaturePtr aSubFeature = theComposite->subFeature(i);
     static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get();
     aECreator->sendUpdated(aSubFeature, theEventId);