From 135d15efcc2d35b913112e28efa3660104825100 Mon Sep 17 00:00:00 2001 From: Artem Zhidkov Date: Fri, 3 Apr 2020 17:26:29 +0300 Subject: [PATCH] Issue #18944: Cannot delete Part Make PartSet active document when removing a Part. --- src/PartSetPlugin/PartSetPlugin_Remove.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PartSetPlugin/PartSetPlugin_Remove.cpp b/src/PartSetPlugin/PartSetPlugin_Remove.cpp index dee53bf56..a17bfee5e 100644 --- a/src/PartSetPlugin/PartSetPlugin_Remove.cpp +++ b/src/PartSetPlugin/PartSetPlugin_Remove.cpp @@ -46,6 +46,8 @@ void PartSetPlugin_Remove::execute() std::set > aRefFeatures; aRoot->refsToFeature(aFeature, aRefFeatures); if (aRefFeatures.empty()) { + // before removing the part make the partSet active document + 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