#include <AIS_Shape.hxx>
#include <AIS_Dimension.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
+#include <SelectMgr_ListOfFilter.hxx>
+#include <SelectMgr_ListIteratorOfListOfFilter.hxx>
#include <set>
//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;
+ // }
+ //}
}
}
ResultToAISMap::iterator aIt;
Handle(AIS_InteractiveObject) anAISIO;
for (aIt = myResult2AISObjectMap.begin(); aIt != myResult2AISObjectMap.end(); aIt++) {
- anAISIO = (*aIt).second->impl<Handle(AIS_InteractiveObject)>();
+ anAISIO = (*aIt).second->impl<Handle(AIS_InteractiveObject)>();
aContext->Load(anAISIO, -1, true);
if (theModes.size() == 0)
aContext->Activate(anAISIO);
Handle(AIS_InteractiveContext) aContext = AISContext();
if (aContext.IsNull())
return;
+ const SelectMgr_ListOfFilter& aFilters = aContext->Filters();
+ SelectMgr_ListIteratorOfListOfFilter aIt(aFilters);
+ for (; aIt.More(); aIt.Next()) {
+ if (theFilter.Access() == aIt.Value().Access())
+ return;
+ }
aContext->AddFilter(theFilter);
}
void XGUI_ModuleConnector::activateSubShapesSelection(const QIntList& theTypes)
{
XGUI_Displayer* aDisp = myWorkshop->displayer();
+ // Close context if it was opened in order to clear stsndard selection modes
+ aDisp->closeLocalContexts(false);
aDisp->openLocalContext();
// Convert shape types to selection types
QIntList aModes;