]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
This is an improvement to use one AND filter in the viewer context. It serves to...
authornds <natalia.donis@opencascade.com>
Tue, 2 Dec 2014 16:50:25 +0000 (19:50 +0300)
committernds <natalia.donis@opencascade.com>
Tue, 2 Dec 2014 16:50:25 +0000 (19:50 +0300)
The code improvement.

src/PartSet/PartSet_WidgetSketchLabel.cpp
src/PartSet/PartSet_WidgetSketchLabel.h

index 3f7b53b259c8bde874a25356d032b0217c410002..46f641e00c6c981c4dc36756e33d8b2b1f72ae23 100644 (file)
@@ -102,7 +102,7 @@ void PartSet_WidgetSketchLabel::onPlaneSelected()
 
         // Clear selection mode and define sketching mode
         XGUI_Displayer* aDisp = myWorkshop->displayer();
-        aDisp->removeSelectionFilter(myPlaneFilter);
+        aDisp->removeSelectionFilter(myFaceFilter);
         aDisp->closeLocalContexts();
         emit planeSelected(plane());
         setSketchingMode();
@@ -134,9 +134,9 @@ void PartSet_WidgetSketchLabel::activate()
     XGUI_Displayer* aDisp = myWorkshop->displayer();
     aDisp->openLocalContext();
     aDisp->activateObjects(QIntList());
-    if (myPlaneFilter.IsNull())
-      myPlaneFilter = new StdSelect_FaceFilter(StdSelect_Plane);
-    aDisp->addSelectionFilter(myPlaneFilter);
+    if (myFaceFilter.IsNull())
+      myFaceFilter = new StdSelect_FaceFilter(StdSelect_Plane);
+    aDisp->addSelectionFilter(myFaceFilter);
     QIntList aModes;
     aModes << TopAbs_FACE;
     aDisp->activateObjects(aModes);
@@ -153,7 +153,7 @@ void PartSet_WidgetSketchLabel::deactivate()
 {
 
   XGUI_Displayer* aDisp = myWorkshop->displayer();
-  aDisp->removeSelectionFilter(myPlaneFilter);
+  aDisp->removeSelectionFilter(myFaceFilter);
   //aDisp->removeSelectionFilter(mySketchFilter);
   aDisp->closeLocalContexts();
   erasePreviewPlanes();
index 906e962952a40ef48f2f082cad19b4ba9a47bc0a..5d4ad6f52eebe4a30c4e86e45e81459e754b87de 100644 (file)
@@ -90,7 +90,7 @@ signals:
   AISObjectPtr myXYPlane;
   bool myPreviewDisplayed;
 
-  Handle(StdSelect_FaceFilter) myPlaneFilter;
+  Handle(StdSelect_FaceFilter) myFaceFilter;
   //Handle(ModuleBase_ShapeInPlaneFilter) mySketchFilter;
 };