From: vsv Date: Fri, 31 Oct 2014 13:34:42 +0000 (+0300) Subject: Issue #199: Deactivate trihedron in local selection X-Git-Tag: V_0.5~47 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=229fc7c1da8e5417353f36af0eef02c6f62550c4;p=modules%2Fshaper.git Issue #199: Deactivate trihedron in local selection --- 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++) {