View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0033325 | Community | OCCT:Visualization | public | 2023-02-08 19:04 | 2023-02-09 13:40 |
| Reporter | francois_lauzon | Assigned To | sshutina | ||
| Priority | normal | Severity | minor | ||
| Status | new | Resolution | open | ||
| Platform | Windows | OS | VC++ 2019 | ||
| Product Version | 7.6.3 | ||||
| Summary | 0033325: AIS_InteractiveContext::setObjectStatus not using ToPropagateVisualState() in AIS_InteractiveContext::setObjectStatus() | ||||
| Description | In OCC 7.7.0 The method AIS_InteractiveContext::setObjectStatus() is not using the flag ToPropagateVisualState() to propagate or not the parent object status. This cause a child object of a parent, at startup, to not having the presentation compute (or something similar), the child object is invisible. To fix the issue, I simply used the same steps in AIS_InteractiveContext::setObjectStatus() as what is done in PrsMgr_PresentationManager::Clear(), PrsMgr_PresentationManager::Display(), ... Where the ToPropagateVisualState() is tested before. A fix is also proposed below... | ||||
| Steps To Reproduce | Create an object as a child of another (using PrsMgr_PresentableObject::AddChild() ) Display the parent object... this will propagate the display status to the child When we try to display the child object (using AIS_InteractiveContext), nothing will be done as it is already tag as displayed | ||||
| Additional information and documentation updates | Here is the fix:
void AIS_InteractiveContext::setObjectStatus (const Handle(AIS_InteractiveObject)& theIObj,
const PrsMgr_DisplayStatus theStatus,
const Standard_Integer theDispMode,
const Standard_Integer theSelectionMode)
{
theIObj->SetDisplayStatus (theStatus);
if (theStatus != PrsMgr_DisplayStatus_None)
{
Handle(AIS_GlobalStatus) aStatus = new AIS_GlobalStatus();
aStatus->SetDisplayMode (theDispMode);
if (theSelectionMode != -1)
{
aStatus->AddSelectionMode (theSelectionMode);
}
myObjects.Bind (theIObj, aStatus);
}
else
{
myObjects.UnBind (theIObj);
}
if (theIObj->ToPropagateVisualState()) {
for (PrsMgr_ListOfPresentableObjectsIter aPrsIter (theIObj->Children()); aPrsIter.More(); aPrsIter.Next())
{
Handle(AIS_InteractiveObject) aChild (Handle(AIS_InteractiveObject)::DownCast (aPrsIter.Value()));
if (aChild.IsNull())
{
continue;
}
setObjectStatus (aChild, theStatus, theDispMode, theSelectionMode);
}
}
}
| ||||
| Tags | No tags attached. | ||||
| Test case number | |||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2023-02-08 19:04 | francois_lauzon | New Issue | |
| 2023-02-08 19:04 | francois_lauzon | Assigned To | => sshutina |
| 2023-02-09 13:40 | dpasukhi | Additional Information Updated |