From 1a03e0f323e0c5133085557f8a9f7ad626e11dfa Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 9 Jul 2015 13:02:09 +0300 Subject: [PATCH] Issue #739: Activation of parts on Parts operations --- src/PartSet/PartSet_Module.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 664dc7d58..0ea84ee28 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -832,7 +833,14 @@ void PartSet_Module::processEvent(const std::shared_ptr& theMess { if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_DOCUMENT_CHANGED)) { // Do not change activation of parts if an operation active - if (myWorkshop->currentOperation() && myWorkshop->currentOperation()->id().toStdString() != PartSetPlugin_Part::ID()) + static QStringList aAllowActivationList; + if (aAllowActivationList.isEmpty()) + aAllowActivationList << + QString(PartSetPlugin_Part::ID().c_str()) << + QString(PartSetPlugin_Duplicate::ID().c_str()) << + QString(PartSetPlugin_Remove::ID().c_str()); + if (myWorkshop->currentOperation() && + (!aAllowActivationList.contains(myWorkshop->currentOperation()->id()))) return; XGUI_ModuleConnector* aConnector = dynamic_cast(myWorkshop); XGUI_Workshop* aWorkshop = aConnector->workshop(); -- 2.39.2