mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-08 18:40:55 +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:
parent
ed667b9069
commit
d0fbc7e5dd
@ -310,6 +310,10 @@ bool VInspector_Window::Init (const NCollection_List<Handle(Standard_Transient)>
|
|||||||
if (!aCallBack.IsNull() && aCallBack != myCallBack)
|
if (!aCallBack.IsNull() && aCallBack != myCallBack)
|
||||||
{
|
{
|
||||||
myCallBack = aCallBack;
|
myCallBack = aCallBack;
|
||||||
|
VInspector_ViewModelHistory* aHistoryModel = dynamic_cast<VInspector_ViewModelHistory*>
|
||||||
|
(myHistoryView->model());
|
||||||
|
myCallBack->SetContext(aContext);
|
||||||
|
myCallBack->SetHistoryModel(aHistoryModel);
|
||||||
}
|
}
|
||||||
return true;
|
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())
|
for (NCollection_List<Handle(AIS_InteractiveObject)>::Iterator anIOIt(aSelectedPresentations); anIOIt.More(); anIOIt.Next())
|
||||||
{
|
{
|
||||||
Handle(AIS_InteractiveObject) aPresentation = Handle(AIS_Shape)::DownCast(anIOIt.Value());
|
Handle(AIS_InteractiveObject) aPresentation = anIOIt.Value();
|
||||||
if (aPresentation.IsNull())
|
if (theToDisplay)
|
||||||
continue;
|
{
|
||||||
if (theToDisplay) {
|
|
||||||
aContext->Display(aPresentation, false);
|
aContext->Display(aPresentation, false);
|
||||||
aContext->Load(aPresentation, -1, true);
|
aContext->Load(aPresentation, -1, true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user