X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_ResultPart.cpp;h=bb12b10756fffa3c95096e4eda37a3d8ca10f63d;hb=283433d9c2f39fbd332d6eba691b6a0cd875e29d;hp=7ce87b434be98d602a06a048d5bb9bd2e393edbe;hpb=fc787375f074af74e17464b400cc59797590e52b;p=modules%2Fshaper.git diff --git a/src/Model/Model_ResultPart.cpp b/src/Model/Model_ResultPart.cpp index 7ce87b434..bb12b1075 100644 --- a/src/Model/Model_ResultPart.cpp +++ b/src/Model/Model_ResultPart.cpp @@ -50,9 +50,7 @@ std::shared_ptr Model_ResultPart::partDoc() Model_ResultPart::Model_ResultPart() { - myIsDisabled = true; // by default it is not initialized and false to be after created myIsInLoad = false; - setIsConcealed(false); } void Model_ResultPart::activate() @@ -112,9 +110,9 @@ bool Model_ResultPart::setDisabled(std::shared_ptr theThis, if (!myTrsf.get()) { // disable of base result part DocumentPtr aDoc = Model_ResultPart::partDoc(); if (aDoc.get() && aDoc->isOpened()) { + std::shared_ptr anIntDoc = std::dynamic_pointer_cast(aDoc); // make the current feature the last in any case: to update shapes defore deactivation too - FeaturePtr aLastFeature = std::dynamic_pointer_cast(aDoc->object( - ModelAPI_Feature::group(), aDoc->size(ModelAPI_Feature::group()) - 1)); + FeaturePtr aLastFeature = anIntDoc->lastFeature(); aDoc->setCurrentFeature(aLastFeature, false); if (theFlag) { // disable, so make all features disabled too // update the shape just before the deactivation: it will be used outside of part