From cee3586fd1275abe4b6a637e9ff31dd4f5352548 Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 5 Sep 2019 12:55:18 +0300 Subject: [PATCH] Fix for the issue #3010: Cannot remove a part --- src/Model/Model_Objects.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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()); -- 2.30.2