X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_MenuMgr.cpp;h=9b82b66c3460a2bba5e43223dd5def81c76164ae;hb=d9aad73be5a44ff8e42162a30a0d9045df7f3837;hp=f9d7b2153ec2d071851a106f0302fb85b59b0850;hpb=9503b9474d57935de95296dfe6587f6422a6d85d;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_MenuMgr.cpp b/src/PartSet/PartSet_MenuMgr.cpp index f9d7b2153..9b82b66c3 100644 --- a/src/PartSet/PartSet_MenuMgr.cpp +++ b/src/PartSet/PartSet_MenuMgr.cpp @@ -79,10 +79,6 @@ void PartSet_MenuMgr::createActions() connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onActivatePart(bool))); myActions["ACTIVATE_PART_CMD"] = aAction; - aAction = new QAction(QIcon(":icons/deactivate.png"), tr("Deactivate"), this); - connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onActivatePartSet(bool))); - myActions["DEACTIVATE_PART_CMD"] = aAction; - // Activate PartSet aAction = new QAction(QIcon(":icons/activate.png"), tr("Activate"), this); connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onActivatePartSet(bool))); @@ -481,16 +477,17 @@ void PartSet_MenuMgr::onActivatePartSet(bool) { if (myModule->workshop()->currentOperation()) return; + activatePartSet(); +} + +void PartSet_MenuMgr::activatePartSet() const +{ SessionPtr aMgr = ModelAPI_Session::get(); bool isNewTransaction = !aMgr->isOperation(); // activation may cause changes in current features in document, so it must be in transaction - if (isNewTransaction) { - aMgr->startOperation("Activation"); - } + if (isNewTransaction) aMgr->startOperation("Activation"); aMgr->setActiveDocument(aMgr->moduleDocument()); - if (isNewTransaction) { - aMgr->finishOperation(); - } + if (isNewTransaction) aMgr->finishOperation(); } void PartSet_MenuMgr::onEdit(bool)