projects
/
occt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c16249
)
0027944: Visualization, V3d_View - filter duplicates within ::AddClipPlane()
author
kgv
<kgv@opencascade.com>
Sun, 9 Oct 2016 18:59:58 +0000
(21:59 +0300)
committer
apn
<apn@opencascade.com>
Thu, 13 Oct 2016 10:41:36 +0000
(13:41 +0300)
src/V3d/V3d_View_2.cxx
patch
|
blob
|
blame
|
history
diff --git
a/src/V3d/V3d_View_2.cxx
b/src/V3d/V3d_View_2.cxx
index
597c97a
..
ce30c49
100644
(file)
--- 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);