From e37b7a0f36be9727f1727a0f9621a09690534407 Mon Sep 17 00:00:00 2001 From: mpv Date: Fri, 7 Sep 2018 09:02:19 +0300 Subject: [PATCH] Issue #2628 : crash on move history line outside of folder. Correct management of folders content on move to the end implementation. --- src/Model/Model_Objects.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Model/Model_Objects.cpp b/src/Model/Model_Objects.cpp index 1fdd49ac3..1b8dad602 100644 --- a/src/Model/Model_Objects.cpp +++ b/src/Model/Model_Objects.cpp @@ -378,6 +378,9 @@ void Model_Objects::moveFeature(FeaturePtr theMoved, FeaturePtr theAfterThis) if (theAfterThis.get()) anAfterLab = std::dynamic_pointer_cast(theAfterThis->data())->label().Father(); + // check whether some folder refers to the moved feature by start or end: if yes, remove from it + removeFromFolder(std::list(1, theMoved)); + Handle(TDataStd_HLabelArray1) aNewArray = new TDataStd_HLabelArray1(aRefs->Lower(), aRefs->Upper()); int aPassedMovedFrom = 0; // the prev feature location is found and passed -- 2.39.2