]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To intialize class attributes before to use them
authorapo <apo@opencascade.com>
Wed, 25 Jun 2008 13:26:02 +0000 (13:26 +0000)
committerapo <apo@opencascade.com>
Wed, 25 Jun 2008 13:26:02 +0000 (13:26 +0000)
src/VISU_I/VISU_ColoredPrs3d_i.cc
src/VISU_I/VISU_CutLines_i.cc

index 10e268025270f98fd650371aae21db87218f8453..5d2b629da8256be9b1a08f27dedb65c5370de779 100644 (file)
@@ -170,6 +170,12 @@ VISU::ColoredPrs3d_i::
 ColoredPrs3d_i(EPublishInStudyMode thePublishInStudyMode) :
   myPublishInStudyMode(thePublishInStudyMode),
   myIsTimeStampFixed(thePublishInStudyMode == EPublishUnderTimeStamp),
+  myEntity( VISU::Entity( -1 ) ),
+  myPreviousEntity( VISU::Entity( -1 ) ),
+  myTimeStampNumber( -1 ),
+  myPreviousTimeStampNumber( -1 ),
+  myIsUnits( true ),
+  myOrientation( VISU::ColoredPrs3dBase::HORIZONTAL ),
   myColoredPL(NULL),
   myIsFixedRange(false),
   myIsRestored(true)
@@ -341,7 +347,7 @@ void
 VISU::ColoredPrs3d_i
 ::SetEntity(VISU::Entity theEntity)
 {
-  if(myEntity == theEntity)
+  if ( myEntity == theEntity )
     return;
 
   VISU::TSetModified aModified(this);
@@ -425,7 +431,7 @@ void
 VISU::ColoredPrs3d_i
 ::SetTimeStampNumber(CORBA::Long theTimeStampNumber)
 {
-  if(myTimeStampNumber == theTimeStampNumber)
+  if ( myTimeStampNumber == theTimeStampNumber )
     return;
 
   VISU::TSetModified aModified(this);
@@ -931,7 +937,7 @@ void
 VISU::ColoredPrs3d_i
 ::SetBarOrientation(VISU::ColoredPrs3dBase::Orientation theOrientation)
 {
-  if(myOrientation == theOrientation)
+  if ( myOrientation == theOrientation )
     return;
 
   VISU::TSetModified aModified(this);
@@ -1177,13 +1183,15 @@ VISU::ColoredPrs3d_i
 //----------------------------------------------------------------------------
 void
 VISU::ColoredPrs3d_i
-::SetUnitsVisible(CORBA::Boolean isVisible)
+::SetUnitsVisible(CORBA::Boolean theIsVisible)
 {
-  if( myIsUnits != isVisible ){
-    VISU::TSetModified aModified(this);
-    myIsUnits = isVisible;
-    myParamsTime.Modified();
-  }
+  if ( myIsUnits == theIsVisible ) 
+    return;
+
+  VISU::TSetModified aModified( this );
+
+  myIsUnits = theIsVisible;
+  myParamsTime.Modified();
 }
 
 //----------------------------------------------------------------------------
index 06f6f87a518ac5e9fa870b70806cc6ee4412385e..118faa110bebfb99ccda343500326adcb2e28a94 100644 (file)
@@ -102,6 +102,7 @@ VISU::CutLines_i::
 CutLines_i(EPublishInStudyMode thePublishInStudyMode) :
   ColoredPrs3d_i(thePublishInStudyMode),
   ScalarMap_i(thePublishInStudyMode),
+  myUseAbsLength( false ),
   myCutLinesPL(NULL)
 {}
 
@@ -551,7 +552,7 @@ void
 VISU::CutLines_i
 ::SetUseAbsoluteLength(CORBA::Boolean theAbsLength)
 {
-  if(myUseAbsLength == theAbsLength)
+  if ( myUseAbsLength == theAbsLength )
     return;
 
   VISU::TSetModified aModified(this);