X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_Displayer.cpp;h=7e5deb50ed54333a332d96c841dd1b68a05a78d0;hb=4ee6972a725f02500c2c543abeef2909180e09c1;hp=3eb66b044ede7782de3871109ce49c41496cde64;hpb=0e0fbf9575328ff16c47b62148f159163a8c9e85;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index 3eb66b044..7e5deb50e 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -55,7 +55,7 @@ void XGUI_Displayer::Display(boost::shared_ptr theFeature, }*/ -std::list XGUI_Displayer::GetSelected() +std::list XGUI_Displayer::GetSelected(const int theShapeTypeToSkip) { std::set > aPrsFeatures; std::list aPresentations; @@ -64,6 +64,8 @@ std::list XGUI_Displayer::GetSelected() for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected()) { Handle(AIS_InteractiveObject) anIO = aContext->SelectedInteractive(); TopoDS_Shape aShape = aContext->SelectedShape(); + if (theShapeTypeToSkip >= 0 && !aShape.IsNull() && aShape.ShapeType() == theShapeTypeToSkip) + continue; boost::shared_ptr aFeature = GetFeature(anIO); if (aPrsFeatures.find(aFeature) != aPrsFeatures.end()) @@ -74,7 +76,7 @@ std::list XGUI_Displayer::GetSelected() return aPresentations; } -std::list XGUI_Displayer::GetHighlighted() +std::list XGUI_Displayer::GetHighlighted(const int theShapeTypeToSkip) { std::set > aPrsFeatures; std::list aPresentations; @@ -83,6 +85,8 @@ std::list XGUI_Displayer::GetHighlighted() for (aContext->InitDetected(); aContext->MoreDetected(); aContext->NextDetected()) { Handle(AIS_InteractiveObject) anIO = aContext->DetectedInteractive(); TopoDS_Shape aShape = aContext->DetectedShape(); + if (theShapeTypeToSkip >= 0 && !aShape.IsNull() && aShape.ShapeType() == theShapeTypeToSkip) + continue; boost::shared_ptr aFeature = GetFeature(anIO); if (aPrsFeatures.find(aFeature) != aPrsFeatures.end()) @@ -122,8 +126,8 @@ void XGUI_Displayer::Redisplay(boost::shared_ptr theFeature, aContext->ClearCurrents(false); aContext->OpenLocalContext(false/*use displayed objects*/, true/*allow shape decomposition*/); // set mouse sensitivity - aContext->SetSensitivityMode(StdSelect_SM_WINDOW); - aContext->SetPixelTolerance(MOUSE_SENSITIVITY_IN_PIXEL); + //aContext->SetSensitivityMode(StdSelect_SM_WINDOW); + //aContext->SetPixelTolerance(MOUSE_SENSITIVITY_IN_PIXEL); } // display or redisplay presentation Handle(AIS_Shape) anAIS;