From: mpv Date: Thu, 17 Sep 2015 09:08:11 +0000 (+0300) Subject: Fix for the issue #991 X-Git-Tag: V_1.4.0~39 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ade1afec98d9bbdfe767ccccbe2c250af882b0aa;p=modules%2Fshaper.git Fix for the issue #991 --- diff --git a/src/Model/Model_ResultPart.cpp b/src/Model/Model_ResultPart.cpp index 7edb9b2e5..bb12b1075 100644 --- a/src/Model/Model_ResultPart.cpp +++ b/src/Model/Model_ResultPart.cpp @@ -110,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