diff --git a/src/V3d/V3d_View_2.cxx b/src/V3d/V3d_View_2.cxx index 597c97a6a1..ce30c49bee 100644 --- a/src/V3d/V3d_View_2.cxx +++ b/src/V3d/V3d_View_2.cxx @@ -150,6 +150,18 @@ void V3d_View::AddClipPlane (const Handle(Graphic3d_ClipPlane)& thePlane) { aSeqOfPlanes = new Graphic3d_SequenceOfHClipPlane(); } + else + { + for (Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (*aSeqOfPlanes); aPlaneIt.More(); aPlaneIt.Next()) + { + const Handle(Graphic3d_ClipPlane)& aPlane = aPlaneIt.Value(); + if (aPlane == thePlane) + { + // plane is already defined in view + return; + } + } + } aSeqOfPlanes->Append (thePlane); SetClipPlanes (aSeqOfPlanes);