Salome HOME
IMP 22792: EDF 8159 SMESH: Multi-dimensional extrusion/extrusion along a path/revolution
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_FilterDlg.cxx
index f75ccd7b379e325b0979a9aec8517c0f1712b975..891b41ca5eee8c96d3a58dcafa1a95eca29f44de 100755 (executable)
@@ -3299,13 +3299,18 @@ bool SMESHGUI_FilterDlg::onApply()
     insertFilterInViewer();
 
     if (!myFilter[ aCurrType ]->GetPredicate()->_is_nil()) {
-      QList<int> aResultIds;
-      filterSource(aCurrType, aResultIds);
-      // select in viewer
-      selectInViewer(aCurrType, aResultIds);
+      // 
+      bool toFilter = (( SMESH::FindActorByObject( myMesh )) ||
+                       ( myInitSourceWgOnApply && mySourceWg ) ||
+                       ( mySourceGrp->checkedId() == Dialog && mySourceWg ));
+      if ( toFilter ) {
+        QList<int> aResultIds;
+        filterSource(aCurrType, aResultIds);
+        // select in viewer
+        selectInViewer(aCurrType, aResultIds);
+      }
     }
 
-
     myInsertState[ aCurrType ] = mySetInViewer->isChecked();
     myApplyToState[ aCurrType ] = mySourceGrp->checkedId();
   }