Prs3d_Presentation::Connect() Problem

According to the documentation of Graphic3d_Structure::Connect(), "The connection propagates Display, Highlight, Erase, Remove, and stacks the transformations."
The following code is expected to display the presentations of both lines, but it doesn't. It only displays prsLine1. What are we doing wrong?

Handle(Prs3d_Presentation) prsLine1 = new Prs3d_Presentation(myContext->CurrentViewer()->Viewer());
Graphic3d_Array1OfVertex V1(1,2);
V1(1).SetCoord(0.,0.,0.);
V1(2).SetCoord(1000.,1000.,0.);
Prs3d_Root::CurrentGroup(prsLine1)->Polyline(V1);
Handle(Prs3d_Presentation) prsLine2 = new Prs3d_Presentation(myContext->CurrentViewer()->Viewer());
Graphic3d_Array1OfVertex V2(1,2);
V2(1).SetCoord(-500.,0.,0.);
V2(2).SetCoord(-1500.,0.,0.);
Prs3d_Root::CurrentGroup(prsLine2)->Polyline(V2);
prsLine1->Connect(prsLine2);
prsLine1->Display();

Thank you.

archint's picture

We have been able to display the connected presentation by enabling its visibility attribute:
prsLine1->Connect(prsLine2);
prsLine2->SetVisible(Standard_True); // <--
prsLine1->Display();

Is this the correct behavior? According to the documentation, as we mentioned in the previous post, the display attribute should propagate, as it happens when erasing the ancestor presentation prsLine1 (the connected prsLine2 is erased, too, and there is no need to set visibility to false in this case).