]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2154: Do not synchronize selection for result and features if any operation...
authorvsv <vsv@opencascade.com>
Tue, 16 May 2017 14:35:07 +0000 (17:35 +0300)
committervsv <vsv@opencascade.com>
Tue, 16 May 2017 14:36:17 +0000 (17:36 +0300)
src/XGUI/XGUI_SelectionMgr.cpp

index 6a85f224db60e5f455dc4ad2d355195ee09f9d72..f4a0b397b85659a18874ef03da944f99875bb3af 100755 (executable)
@@ -8,6 +8,7 @@
 #include "XGUI_ViewerProxy.h"
 #include "XGUI_Displayer.h"
 #include "XGUI_Selection.h"
+#include "XGUI_OperationMgr.h"
 
 #ifndef HAVE_SALOME
 #include <AppElements_MainWindow.h>
@@ -121,6 +122,7 @@ void XGUI_SelectionMgr::onViewerSelection()
   QObjectPtrList aFeatures;
   ResultPtr aResult;
   FeaturePtr aFeature;
+  bool aHasOperation = (myWorkshop->operationMgr()->currentOperation() != 0);
   Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext();
   if (!aContext.IsNull()) {
     QList<ModuleBase_ViewerPrsPtr> aPresentations =
@@ -129,7 +131,7 @@ void XGUI_SelectionMgr::onViewerSelection()
       if (aPrs->object().get()) {
         if (!aFeatures.contains(aPrs->object()))
           aFeatures.append(aPrs->object());
-        if (aPrs->shape().get()) {
+        if (aPrs->shape().get() && (!aHasOperation)) {
           aResult = std::dynamic_pointer_cast<ModelAPI_Result>(aPrs->object());
           if (aResult.get()) {
             aFeature = anActiveDocument->producedByFeature(aResult, aPrs->shape());