From 4db1dc1a2823881c588388fb1d5fa3d302bc7108 Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 18 Dec 2018 15:04:52 +0300 Subject: [PATCH] Fix for the issue #2814 : error when dump/load script from valid document --- src/Model/Model_ResultBody.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Model/Model_ResultBody.cpp b/src/Model/Model_ResultBody.cpp index c226ac762..8f8c218bb 100644 --- a/src/Model/Model_ResultBody.cpp +++ b/src/Model/Model_ResultBody.cpp @@ -271,8 +271,9 @@ void Model_ResultBody::updateSubs(const std::shared_ptr& theThisS } else { // just update shape of this result aSub = mySubs[aSubIndex]; } - if (!aShape->isEqual(aSub->shape())) { - aSub->store(aShape, false); + GeomShapePtr anOldSubShape = aSub->shape(); + aSub->store(aShape, false); // store even equal to call "clear": #2814 + if (!aShape->isEqual(anOldSubShape)) { aECreator->sendUpdated(aSub, EVENT_DISP); aECreator->sendUpdated(aSub, EVENT_UPD); } -- 2.39.2