+ //aContext->UseDisplayedObjects();
+ //myUseExternalObjects = true;
+
+ AIS_ListOfInteractive aPrsList;
+ displayedObjects(aContext, aPrsList);
+
+ Handle(AIS_Trihedron) aTrihedron;
+ AIS_ListIteratorOfListOfInteractive aLIt(aPrsList);
+ Handle(AIS_InteractiveObject) anAISIO;
+ for(aLIt.Initialize(aPrsList); aLIt.More(); aLIt.Next()){
+ anAISIO = aLIt.Value();
+ aContext->Deactivate(anAISIO);
+ aTrihedron = Handle(AIS_Trihedron)::DownCast(anAISIO);
+ //Deactivate trihedron which can be activated in local selector
+ if (aTrihedron.IsNull()) {
+ //aContext->Load(anAISIO, -1, true);
+ // In order to clear active modes list
+ if (myActiveSelectionModes.size() == 0) {
+ aContext->Activate(anAISIO);
+ qDebug("### 2. Activate all %i", (long)anAISIO.Access());
+ } else {
+ foreach(int aMode, myActiveSelectionModes) {
+ aContext->Activate(anAISIO, aMode);
+ qDebug("### 1. Activate all %i, %i", (long)anAISIO.Access(), aMode);
+ }
+ }
+ }
+ }
+}
+
+
+void XGUI_Displayer::deactivateObjects()
+{
+ myActiveSelectionModes.clear();
+ Handle(AIS_InteractiveContext) aContext = AISContext();
+ // Open local context if there is no one
+ if (!aContext->HasOpenedContext())
+ return;
+
+ //aContext->NotUseDisplayedObjects();
+ AIS_ListOfInteractive aPrsList;
+ displayedObjects(aContext, aPrsList);
+
+ AIS_ListIteratorOfListOfInteractive aLIt;
+ Handle(AIS_Trihedron) aTrihedron;
+ Handle(AIS_InteractiveObject) anAISIO;
+ for(aLIt.Initialize(aPrsList); aLIt.More(); aLIt.Next()){
+ anAISIO = aLIt.Value();
+ aContext->Deactivate(anAISIO);
+ aTrihedron = Handle(AIS_Trihedron)::DownCast(anAISIO);
+ if (aTrihedron.IsNull()) {
+ //aContext->Load(anAISIO, -1, true);
+ qDebug("### Deactivate all %i", (long)anAISIO.Access());
+ //aContext->Activate(anAISIO);
+ }