From: mpv Date: Thu, 5 Sep 2019 09:55:18 +0000 (+0300) Subject: Fix for the issue #3010: Cannot remove a part X-Git-Tag: VEDF2019Lot4~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cee3586fd1275abe4b6a637e9ff31dd4f5352548;p=modules%2Fshaper.git Fix for the issue #3010: Cannot remove a part --- diff --git a/src/Model/Model_Objects.cpp b/src/Model/Model_Objects.cpp index 3bda8a663..152aaaeb8 100644 --- a/src/Model/Model_Objects.cpp +++ b/src/Model/Model_Objects.cpp @@ -1848,6 +1848,10 @@ void Model_Objects::updateResults(FeaturePtr theFeature, std::set& t } } + // it may be on undo + if (!theFeature->data() || !theFeature->data()->isValid() || theFeature->isDisabled()) + return; + // check the existing results and remove them if there is nothing on the label std::list::const_iterator aResIter = theFeature->results().cbegin(); while(aResIter != theFeature->results().cend()) { @@ -1864,9 +1868,6 @@ void Model_Objects::updateResults(FeaturePtr theFeature, std::set& t } aResIter++; } - // it may be on undo - if (!theFeature->data() || !theFeature->data()->isValid() || theFeature->isDisabled()) - return; // check that results are presented on all labels int aResSize = int(theFeature->results().size()); TDF_ChildIterator aLabIter(resultLabel(theFeature->data(), 0).Father());