From 229fc7c1da8e5417353f36af0eef02c6f62550c4 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 31 Oct 2014 16:34:42 +0300 Subject: [PATCH] Issue #199: Deactivate trihedron in local selection --- src/XGUI/XGUI_Displayer.cpp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index afc04003c..819d12cc9 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -316,20 +316,6 @@ void XGUI_Displayer::openLocalContext() //aContext->OpenLocalContext(false/*use displayed objects*/, true/*allow shape decomposition*/); aContext->OpenLocalContext(); aContext->NotUseDisplayedObjects(); - - // Deactivate trihedron which can be activated in local selector - //AIS_ListOfInteractive aPrsList; - //aContext->DisplayedObjects(aPrsList, true); - - //Handle(AIS_Trihedron) aTrihedron; - //AIS_ListIteratorOfListOfInteractive aIt(aPrsList); - //for(; aIt.More(); aIt.Next()){ - // aTrihedron = Handle(AIS_Trihedron)::DownCast(aIt.Value()); - // if (!aTrihedron.IsNull()) { - // aContext->Deactivate(aTrihedron); - // break; - // } - //} } } @@ -417,6 +403,21 @@ void XGUI_Displayer::activateObjectsOutOfContext(const QIntList& theModes) return; aContext->UseDisplayedObjects(); + + //Deactivate trihedron which can be activated in local selector + AIS_ListOfInteractive aPrsList; + aContext->DisplayedObjects(aPrsList, true); + + Handle(AIS_Trihedron) aTrihedron; + AIS_ListIteratorOfListOfInteractive aLIt(aPrsList); + for(; aLIt.More(); aLIt.Next()){ + aTrihedron = Handle(AIS_Trihedron)::DownCast(aLIt.Value()); + if (!aTrihedron.IsNull()) { + aContext->Deactivate(aTrihedron); + break; + } + } + ResultToAISMap::iterator aIt; Handle(AIS_InteractiveObject) anAISIO; for (aIt = myResult2AISObjectMap.begin(); aIt != myResult2AISObjectMap.end(); aIt++) { -- 2.39.2