From 846fc649eb3451d1d2d6910d075d854a38c62039 Mon Sep 17 00:00:00 2001 From: Artem Zhidkov Date: Fri, 3 Apr 2020 22:21:33 +0300 Subject: [PATCH] Fix regression related to issue #18994. --- src/PartSetPlugin/PartSetPlugin_Remove.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PartSetPlugin/PartSetPlugin_Remove.cpp b/src/PartSetPlugin/PartSetPlugin_Remove.cpp index a17bfee5e..d1b75d1a0 100644 --- a/src/PartSetPlugin/PartSetPlugin_Remove.cpp +++ b/src/PartSetPlugin/PartSetPlugin_Remove.cpp @@ -47,7 +47,8 @@ void PartSetPlugin_Remove::execute() aRoot->refsToFeature(aFeature, aRefFeatures); if (aRefFeatures.empty()) { // before removing the part make the partSet active document - aPManager->setActiveDocument(aRoot); + if (aThisDoc == aPManager->activeDocument()) + aPManager->setActiveDocument(aRoot); aRoot->removeFeature(aFeature); // the redisplay signal should be flushed in order to erase the feature presentation // in the viewer after removeFeature from the document -- 2.39.2