From: mpv Date: Fri, 4 Sep 2015 08:52:08 +0000 (+0300) Subject: Undo the regression: optimization makes the sketch instable X-Git-Tag: V_1.4.0_beta4~127 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=328e2d6c940686a67a0cc7fddfc674b317e7d695;p=modules%2Fshaper.git Undo the regression: optimization makes the sketch instable --- diff --git a/src/SketchPlugin/SketchPlugin_Sketch.cpp b/src/SketchPlugin/SketchPlugin_Sketch.cpp index 7b993c216..c8f7a22e6 100644 --- a/src/SketchPlugin/SketchPlugin_Sketch.cpp +++ b/src/SketchPlugin/SketchPlugin_Sketch.cpp @@ -143,14 +143,6 @@ void SketchPlugin_Sketch::removeFeature(std::shared_ptr theFea // to keep the persistent sub-elements indexing, do not remove elements from list, // but substitute by nulls reflist(SketchPlugin_Sketch::FEATURES_ID())->substitute(theFeature, ObjectPtr()); - - std::map >::iterator aSubIter = mySubs.begin(); - for(; aSubIter != mySubs.end(); aSubIter++) { - if (aSubIter->second == theFeature) { - mySubs.erase(aSubIter); - break; - } - } } int SketchPlugin_Sketch::numberOfSubs(bool forTree) const @@ -166,12 +158,8 @@ std::shared_ptr SketchPlugin_Sketch::subFeature( if (forTree) return FeaturePtr(); - if (mySubs.find(theIndex) != mySubs.end()) - return mySubs[theIndex]; - ObjectPtr anObj = data()->reflist(SketchPlugin_Sketch::FEATURES_ID())->object(theIndex, false); FeaturePtr aRes = std::dynamic_pointer_cast(anObj); - mySubs[theIndex] = aRes; return aRes; } diff --git a/src/SketchPlugin/SketchPlugin_Sketch.h b/src/SketchPlugin/SketchPlugin_Sketch.h index aadbe9caf..fe0df3ba8 100644 --- a/src/SketchPlugin/SketchPlugin_Sketch.h +++ b/src/SketchPlugin/SketchPlugin_Sketch.h @@ -30,8 +30,6 @@ */ class SketchPlugin_Sketch : public ModelAPI_CompositeFeature, public GeomAPI_ICustomPrs//, public GeomAPI_IPresentable { - /// Optimization: indexes of sketch sub-elements are persistent, so, no problems in synchronization. - std::map > mySubs; public: /// Sketch feature kind inline static const std::string& ID()