1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0029781: Samples - Inspector tool - history tree model is not set into external callback in VInspector

- AIS_InteractiveContex and VInspector_ViewModelHistory are set into VInspector_CallBack
- minor correction of displaySelectedPresentations () to Hide/Show(by popup menu) any AIS_InteractiveObject, not only AIS_Shape (e.g. AIS_Trihedron)
This commit is contained in:
nds 2018-05-17 09:29:04 +03:00 committed by abv
parent ed667b9069
commit d0fbc7e5dd

View File

@ -310,6 +310,10 @@ bool VInspector_Window::Init (const NCollection_List<Handle(Standard_Transient)>
if (!aCallBack.IsNull() && aCallBack != myCallBack)
{
myCallBack = aCallBack;
VInspector_ViewModelHistory* aHistoryModel = dynamic_cast<VInspector_ViewModelHistory*>
(myHistoryView->model());
myCallBack->SetContext(aContext);
myCallBack->SetHistoryModel(aHistoryModel);
}
return true;
}
@ -569,10 +573,9 @@ void VInspector_Window::displaySelectedPresentations(const bool theToDisplay)
for (NCollection_List<Handle(AIS_InteractiveObject)>::Iterator anIOIt(aSelectedPresentations); anIOIt.More(); anIOIt.Next())
{
Handle(AIS_InteractiveObject) aPresentation = Handle(AIS_Shape)::DownCast(anIOIt.Value());
if (aPresentation.IsNull())
continue;
if (theToDisplay) {
Handle(AIS_InteractiveObject) aPresentation = anIOIt.Value();
if (theToDisplay)
{
aContext->Display(aPresentation, false);
aContext->Load(aPresentation, -1, true);
}