+ std::map<ModuleBase_SelectionFilterType, Handle(SelectMgr_Filter)>::const_iterator aFiltersIt =
+ mySelectionFilters.begin();
+ for (; aFiltersIt != mySelectionFilters.end(); aFiltersIt++) {
+ Handle(SelectMgr_Filter) aFilter = aFiltersIt->second;
+ if (!aFilter.IsNull())
+ aFilter.Nullify();
+ }
+}
+
+
+void ModuleBase_IModule::launchModal(const QString& theCmdId)
+{
+ bool isCommitted;
+ if (!myWorkshop->canStartOperation(theCmdId, isCommitted))
+ return;
+
+ std::string aXmlCfg, aDescription;
+ getXMLRepresentation(theCmdId.toStdString(), aXmlCfg, aDescription);
+
+ SessionPtr aMgr = ModelAPI_Session::get();
+ aMgr->startOperation(theCmdId.toStdString());
+
+ ModuleBase_Dialog aDlg(myWorkshop, theCmdId, aXmlCfg);
+ if (aDlg.exec() == QDialog::Accepted)
+ aMgr->finishOperation();
+ else
+ aMgr->abortOperation();
+ myWorkshop->updateCommandStatus();
+}
+
+
+void ModuleBase_IModule::launchOperation(const QString& theCmdId,
+ const bool& isStartAfterCommitOnly)
+{
+ /// selection should be obtained from workshop before ask if the operation can be started as
+ /// the canStartOperation method performs commit/abort of previous operation.
+ /// Sometimes commit/abort may cause selection clear(Sketch operation) as a result
+ /// it will be lost and is not used for preselection.
+ ModuleBase_ISelection* aSelection = myWorkshop->selection();
+ QList<ModuleBase_ViewerPrsPtr> aPreSelected =
+ aSelection->getSelected(ModuleBase_ISelection::AllControls);
+
+ ModuleBase_OperationFeature* aCurOperation = dynamic_cast<ModuleBase_OperationFeature*>
+ (myWorkshop->currentOperation());
+ QString aCurOperationKind = aCurOperation ? aCurOperation->getDescription()->operationId() : "";
+
+ bool isCommitted;
+ if (!myWorkshop->canStartOperation(theCmdId, isCommitted))
+ return;
+
+ /// reentrant operation(Sketch Line) should not be started if operation is aborted
+ if (isStartAfterCommitOnly && !isCommitted)