//
// This file is part of Open CASCADE Technology software library.
//
-// This library is free software; you can redistribute it and / or modify it
-// under the terms of the GNU Lesser General Public version 2.1 as published
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
myMainPM(new PrsMgr_PresentationManager3d(MainViewer->Viewer())),
myMainVwr(MainViewer),
myMainSel(new StdSelect_ViewerSelector3d()),
-myToHilightSelected( Standard_False ),
+myToHilightSelected( Standard_True ),
myFilters(new SelectMgr_OrFilter()),
myDefaultDrawer(new Prs3d_Drawer()),
myDefaultColor(Quantity_NOC_GOLDENROD),
//function : Update
//purpose :
//=======================================================================
-
-void AIS_InteractiveContext::Update(const Handle(AIS_InteractiveObject)& anIObj,
- const Standard_Boolean updateviewer)
+void AIS_InteractiveContext::Update (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theUpdateViewer)
{
- if(anIObj.IsNull()) return;
+ if (theIObj.IsNull())
+ {
+ return;
+ }
-
+ TColStd_ListOfInteger aListOfFlaggedPrsModes;
+ theIObj->ToBeUpdated (aListOfFlaggedPrsModes);
- TColStd_ListOfInteger LL;
- anIObj->ToBeUpdated(LL);
- TColStd_ListIteratorOfListOfInteger ITI(LL);
- Standard_Boolean wasupdated(Standard_False);
-
- for (;ITI.More();ITI.Next()){
- anIObj->Update(ITI.Value(),Standard_False);
- wasupdated = Standard_True;
+ TColStd_ListIteratorOfListOfInteger aPrsModesIt (aListOfFlaggedPrsModes);
+ for ( ; aPrsModesIt.More(); aPrsModesIt.Next())
+ {
+ theIObj->Update (aPrsModesIt.Value(), Standard_False);
}
-
- if(wasupdated)
- mgrSelector->Update(anIObj);
-
- if(updateviewer){
- if(!myObjects.IsBound(anIObj)) return;
- switch(myObjects(anIObj)->GraphicStatus()){
- case AIS_DS_Displayed:
- case AIS_DS_Temporary:
- myMainVwr->Update();
- break;
- default:
- break;
+
+ mgrSelector->Update(theIObj);
+
+ if (theUpdateViewer)
+ {
+ if (!myObjects.IsBound (theIObj))
+ {
+ return;
+ }
+
+ switch (myObjects (theIObj)->GraphicStatus())
+ {
+ case AIS_DS_Displayed:
+ case AIS_DS_Temporary:
+ myMainVwr->Update();
+ break;
+ default:
+ break;
}
}
}
-
-
//=======================================================================
//function : SetLocation
//purpose :
//purpose :
//=======================================================================
-void AIS_InteractiveContext::SetSelectionMode(const Handle_AIS_InteractiveObject&, const Standard_Integer )
+void AIS_InteractiveContext::SetSelectionMode(const Handle(AIS_InteractiveObject)&, const Standard_Integer )
{
}
//purpose :
//=======================================================================
-void AIS_InteractiveContext::UnsetSelectionMode(const Handle_AIS_InteractiveObject&)
+void AIS_InteractiveContext::UnsetSelectionMode(const Handle(AIS_InteractiveObject)&)
{
}
//purpose :
//=======================================================================
-Standard_Boolean AIS_InteractiveContext::IsInLocal(const Handle_AIS_InteractiveObject& anIObj,
+Standard_Boolean AIS_InteractiveContext::IsInLocal(const Handle(AIS_InteractiveObject)& anIObj,
Standard_Integer& TheIndex) const
{
if(anIObj.IsNull()) return Standard_False;