From c27ab5eb4e59d6f3a592499294bb26b75d3cc971 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 11 Apr 2017 14:08:10 +0300 Subject: [PATCH] Issue #2123: Unexpected Sketcher behavior when creating Coincidence --- src/ModuleBase/ModuleBase_IModule.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ModuleBase/ModuleBase_IModule.cpp b/src/ModuleBase/ModuleBase_IModule.cpp index ca6c1b1bc..ad7eb2edd 100644 --- a/src/ModuleBase/ModuleBase_IModule.cpp +++ b/src/ModuleBase/ModuleBase_IModule.cpp @@ -90,7 +90,6 @@ void ModuleBase_IModule::launchOperation(const QString& theCmdId, (myWorkshop->currentOperation()); QString anOperationKind = aCurOperation ? aCurOperation->getDescription()->operationId() : ""; - bool isCommitted; if (!myWorkshop->canStartOperation(theCmdId, isCommitted)) return; @@ -106,9 +105,10 @@ void ModuleBase_IModule::launchOperation(const QString& theCmdId, if (aMessage.get()) { setReentrantPreSelection(aMessage); } - else if (anOperationKind == theCmdId) // restore of selection only if the kind is the same + else if (anOperationKind.isEmpty() || anOperationKind == theCmdId) { + // restore of previous opeation is absent or new launched operation has the same kind aFOperation->initSelection(aPreSelected); - + } workshop()->processLaunchOperation(aFOperation); if (aFOperation) { -- 2.39.2