From 571719c053d926273a3f4579e17e984eb3e6780a Mon Sep 17 00:00:00 2001 From: apo Date: Tue, 16 Jan 2007 13:36:33 +0000 Subject: [PATCH] Do not copy the parameter twice. First time they are copied at Prs3d::SameAs (myPipeLine->ShallowCopy(anOrigin)) --- src/VISU_I/VISU_GaussPoints_i.cc | 73 +++++++++++++++++++++++--------- src/VISU_I/VISU_GaussPoints_i.hh | 8 ++-- 2 files changed, 58 insertions(+), 23 deletions(-) diff --git a/src/VISU_I/VISU_GaussPoints_i.cc b/src/VISU_I/VISU_GaussPoints_i.cc index daa945e6..0410404d 100644 --- a/src/VISU_I/VISU_GaussPoints_i.cc +++ b/src/VISU_I/VISU_GaussPoints_i.cc @@ -39,6 +39,8 @@ #include "SUIT_ResourceMgr.h" +#include "VISU_PipeLineUtils.hxx" + #include #include #include @@ -214,30 +216,13 @@ VISU::GaussPoints_i SetIsActiveLocalScalarBar(anOrigin->GetIsActiveLocalScalarBar()); SetIsDispGlobalScalarBar(anOrigin->GetIsDispGlobalScalarBar()); - SetBiColor(anOrigin->GetBiColor()); SetSpacing(anOrigin->GetSpacing()); - SetPrimitiveType(anOrigin->GetPrimitiveType()); - SetClamp(anOrigin->GetClamp()); - SetMinSize(anOrigin->GetMinSize()); - SetMaxSize(anOrigin->GetMaxSize()); - SetGeomSize(anOrigin->GetGeomSize()); - - SetMagnification(anOrigin->GetMagnification()); - SetMagnificationIncrement(anOrigin->GetMagnificationIncrement()); - - SetIsDeformed(anOrigin->GetIsDeformed()); - SetScaleFactor(anOrigin->GetScaleFactor()); - SetFaceLimit(anOrigin->GetFaceLimit()); - SetIsColored(anOrigin->GetIsColored()); SetColor(anOrigin->GetColor()); - SetAlphaThreshold(anOrigin->GetAlphaThreshold()); SetTextures(anOrigin->GetMainTexture(), anOrigin->GetAlphaTexture()); - - SetResolution(anOrigin->GetResolution()); } } @@ -353,6 +338,24 @@ VISU::GaussPoints_i } +//---------------------------------------------------------------------------- +int +VISU::GaussPoints_i +::GetFaceLimit() +{ + return myFaceLimit; +} + +void +VISU::GaussPoints_i +::SetFaceLimit( int theFaceLimit ) +{ + if( myFaceLimit != theFaceLimit ){ + myFaceLimit = theFaceLimit; + myParamsTime.Modified(); + } +} + //---------------------------------------------------------------------------- void VISU::GaussPoints_i @@ -368,6 +371,7 @@ VISU::GaussPoints_i return myGaussPointsPL->GetIsDeformed(); } +//---------------------------------------------------------------------------- void VISU::GaussPoints_i ::SetScaleFactor( vtkFloatingPointType theScaleFactor ) @@ -382,6 +386,23 @@ VISU::GaussPoints_i return myGaussPointsPL->GetScale(); } +//---------------------------------------------------------------------------- +QColor +VISU::GaussPoints_i +::GetColor() +{ + return myColor; +} + +void +VISU::GaussPoints_i +::SetColor( const QColor& theColor ) +{ + myColor = theColor; + myParamsTime.Modified(); +} + +//---------------------------------------------------------------------------- void VISU::GaussPoints_i ::SetIsColored( bool theIsColored ) @@ -396,6 +417,7 @@ VISU::GaussPoints_i return myGaussPointsPL->GetIsColored(); } +//---------------------------------------------------------------------------- bool VISU::GaussPoints_i ::SetMainTexture( const QString& theMainTexture ) @@ -412,6 +434,7 @@ VISU::GaussPoints_i return myMainTexture; } +//---------------------------------------------------------------------------- bool VISU::GaussPoints_i ::SetAlphaTexture( const QString& theAlphaTexture ) @@ -428,6 +451,7 @@ VISU::GaussPoints_i return myAlphaTexture; } +//---------------------------------------------------------------------------- void VISU::GaussPoints_i ::SetAlphaThreshold( vtkFloatingPointType theAlphaThreshold ) @@ -442,6 +466,7 @@ VISU::GaussPoints_i return myGaussPointsPL->GetAlphaThreshold(); } +//---------------------------------------------------------------------------- void VISU::GaussPoints_i ::SetResolution( int theResolution ) @@ -456,6 +481,7 @@ VISU::GaussPoints_i return myGaussPointsPL->GetResolution(); } +//---------------------------------------------------------------------------- void VISU::GaussPoints_i ::SetPrimitiveType(int thePrimitiveType) @@ -470,6 +496,7 @@ VISU::GaussPoints_i return myGaussPointsPL->GetPrimitiveType(); } +//---------------------------------------------------------------------------- vtkFloatingPointType VISU::GaussPoints_i ::GetMaximumSupportedSize() @@ -477,6 +504,7 @@ VISU::GaussPoints_i return myGaussPointsPL->GetMaximumSupportedSize(); } +//---------------------------------------------------------------------------- void VISU::GaussPoints_i ::SetClamp(vtkFloatingPointType theClamp) @@ -491,6 +519,7 @@ VISU::GaussPoints_i return myGaussPointsPL->GetClamp(); } +//---------------------------------------------------------------------------- void VISU::GaussPoints_i ::SetGeomSize( vtkFloatingPointType theGeomSize ) @@ -505,6 +534,7 @@ VISU::GaussPoints_i return myGaussPointsPL->GetSize(); } +//---------------------------------------------------------------------------- void VISU::GaussPoints_i ::SetMinSize( vtkFloatingPointType theMinSize ) @@ -519,6 +549,7 @@ VISU::GaussPoints_i return myGaussPointsPL->GetMinSize(); } +//---------------------------------------------------------------------------- void VISU::GaussPoints_i ::SetMaxSize( vtkFloatingPointType theMaxSize ) @@ -533,6 +564,7 @@ VISU::GaussPoints_i return myGaussPointsPL->GetMaxSize(); } +//---------------------------------------------------------------------------- void VISU::GaussPoints_i ::SetMagnification( vtkFloatingPointType theMagnification ) @@ -547,6 +579,7 @@ VISU::GaussPoints_i return myGaussPointsPL->GetMagnification(); } +//---------------------------------------------------------------------------- void VISU::GaussPoints_i ::SetMagnificationIncrement( vtkFloatingPointType theIncrement ) @@ -940,8 +973,10 @@ void VISU::GaussPoints_i ::SetSpacing(const vtkFloatingPointType theSpacing) { - mySpacing = theSpacing; - myParamsTime.Modified(); + if(!VISU::CheckIsSameValue(mySpacing, theSpacing)){ + mySpacing = theSpacing; + myParamsTime.Modified(); + } } vtkFloatingPointType diff --git a/src/VISU_I/VISU_GaussPoints_i.hh b/src/VISU_I/VISU_GaussPoints_i.hh index 6b6c93c4..b1e54233 100644 --- a/src/VISU_I/VISU_GaussPoints_i.hh +++ b/src/VISU_I/VISU_GaussPoints_i.hh @@ -74,10 +74,10 @@ namespace VISU //---------------------------------------------------------------------------- int - GetFaceLimit() { return myFaceLimit; } + GetFaceLimit(); void - SetFaceLimit( int theFaceLimit ) { myFaceLimit = theFaceLimit; } + SetFaceLimit( int theFaceLimit ); bool GetIsDeformed(); @@ -93,11 +93,11 @@ namespace VISU //! Get color for Geometry mode of the presentation. QColor - GetColor() { return myColor; } + GetColor(); //! Set color for Geometry mode of the presentation. void - SetColor( const QColor& theColor ) { myColor = theColor; } + SetColor( const QColor& theColor ); //! Get flag indicating which mode of the presentation is active. /*! When Results mode is active, returns true. Geometry - false. */ -- 2.39.2