]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for EDF 553 VISU :
authorapo <apo@opencascade.com>
Fri, 28 Sep 2007 05:47:51 +0000 (05:47 +0000)
committerapo <apo@opencascade.com>
Fri, 28 Sep 2007 05:47:51 +0000 (05:47 +0000)
In Animation Bad range by default in Scalarmap
(case for ScalarMapOnDeformedShape presentation type)

src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc

index cdba1fcd0558bff38900dced0351ff94772d8615..5f90db0ec6ec5067a2283224f8627eb02bcd0484 100644 (file)
@@ -218,11 +218,17 @@ void VISU::ScalarMapOnDeformedShape_i::SetTitle(const char* theTitle)
   }
 }
 
-void VISU::ScalarMapOnDeformedShape_i::SetScale(CORBA::Double theScale) { 
+void 
+VISU::ScalarMapOnDeformedShape_i
+::SetScale(CORBA::Double theScale) 
+{ 
   myScalarMapOnDeformedShapePL->SetScale(theScale);
 }
 
-CORBA::Double VISU::ScalarMapOnDeformedShape_i::GetScale(){
+CORBA::Double 
+VISU::ScalarMapOnDeformedShape_i
+::GetScale()
+{
   return myScalarMapOnDeformedShapePL->GetScale();
 }
 
@@ -230,40 +236,39 @@ void
 VISU::ScalarMapOnDeformedShape_i
 ::SetRange(CORBA::Double theMin, CORBA::Double theMax)
 {
-  if(theMin > theMax) 
-    return;
-  vtkFloatingPointType aScalarRange[2] = {theMin, theMax};
-  myScalarMapOnDeformedShapePL->SetScalarRange(aScalarRange);
-  myIsFixedRange = true;
+  TSuperClass::SetRange(theMin, theMax);
 }
 
-void VISU::ScalarMapOnDeformedShape_i::SetSourceRange(CORBA::Double theMinRange,CORBA::Double theMaxRange){
-  SetRange(theMinRange,theMaxRange);
+void
+VISU::ScalarMapOnDeformedShape_i
+::SetSourceRange(CORBA::Double theMin, CORBA::Double theMax)
+{
+  SetRange(theMin, theMax);
 }
 
 void
 VISU::ScalarMapOnDeformedShape_i
 ::SetSourceRange()
 {
-  myScalarMapOnDeformedShapePL->SetSourceRange();
-  myIsFixedRange = false;
+  TSuperClass::SetSourceRange();
 }
 
-CORBA::Double VISU::ScalarMapOnDeformedShape_i::GetSourceRangeMin(){
-  vtkFloatingPointType aRange[2];
-  myScalarMapOnDeformedShapePL->GetSourceRange(aRange);
-  return aRange[0];
+CORBA::Double 
+VISU::ScalarMapOnDeformedShape_i
+::GetSourceRangeMin()
+{
+  return TSuperClass::GetSourceMin();
 }
 
-CORBA::Double VISU::ScalarMapOnDeformedShape_i::GetSourceRangeMax(){
-  vtkFloatingPointType aRange[2];
-  myScalarMapOnDeformedShapePL->GetSourceRange(aRange);
-  return aRange[1];
+CORBA::Double 
+VISU::ScalarMapOnDeformedShape_i
+::GetSourceRangeMax()
+{
+  return TSuperClass::GetSourceMax();
 }
 
 void VISU::ScalarMapOnDeformedShape_i::DoHook()
 {
-  if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::DoHook:"<<__LINE__<<endl;
   if(!myPipeLine)
     myPipeLine = VISU_ScalarMapOnDeformedShapePL::New();
   
@@ -283,9 +288,10 @@ VISU::ScalarMapOnDeformedShape_i
     return "ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE_GROUPS";
 }
 
-VISU_Actor* VISU::ScalarMapOnDeformedShape_i::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) 
+VISU_Actor* 
+VISU::ScalarMapOnDeformedShape_i
+::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) 
 {
-  if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::CreateActor:"<<__LINE__<<endl;
   VISU_Actor* anActor = TSuperClass::CreateActor(theIO, true);
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
   int  aDispMode = aResourceMgr->integerValue("VISU", "scalar_def_represent", 2);
@@ -298,8 +304,10 @@ VISU_Actor* VISU::ScalarMapOnDeformedShape_i::CreateActor(const Handle(SALOME_In
 }
 
 
-void VISU::ScalarMapOnDeformedShape_i::UpdateActor(VISU_Actor* theActor) {
-  if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::UpdateActor:"<<__LINE__<<endl;
+void 
+VISU::ScalarMapOnDeformedShape_i
+::UpdateActor(VISU_Actor* theActor) 
+{
   if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
     if(IsColored()){
       anActor->SetBarVisibility(true);
@@ -313,14 +321,13 @@ void VISU::ScalarMapOnDeformedShape_i::UpdateActor(VISU_Actor* theActor) {
   }
 }
 
-void VISU::ScalarMapOnDeformedShape_i::SetScalarField(const char* theMeshName,
-                                                     const char* theFieldName,
-                                                     int   theIteration,
-                                                     VISU::TEntity  theEntity)
+void
+VISU::ScalarMapOnDeformedShape_i
+::SetScalarField(const char* theMeshName,
+                const char* theFieldName,
+                int   theIteration,
+                VISU::TEntity  theEntity)
 {
-  if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::SetScalarField:"<<__LINE__<<endl;
-  if(MYDEBUG) cout << "\ttheFieldName="<<theFieldName<<endl;
-  if(MYDEBUG) cout << "\ttheIteration="<<theIteration<<endl;
   myScalarField = myResult->GetInput()->GetField(theMeshName,theEntity,theFieldName);
   TVTKOutput* aOut = myResult->GetInput()->GetTimeStampOnMesh(theMeshName,
                                                              theEntity,
@@ -335,10 +342,12 @@ void VISU::ScalarMapOnDeformedShape_i::SetScalarField(const char* theMeshName,
   this->SetScalarEntity(theEntity);
 }
 
-void VISU::ScalarMapOnDeformedShape_i::SetScalarField(const char* theMeshName,
-                                                     const char* theFieldName,
-                                                     CORBA::Long  theIteration,
-                                                     VISU::Entity  theEntity)
+void
+VISU::ScalarMapOnDeformedShape_i
+::SetScalarField(const char* theMeshName,
+                const char* theFieldName,
+                CORBA::Long  theIteration,
+                VISU::Entity  theEntity)
 {
   this->SetScalarField(theMeshName,theFieldName,(int)theIteration,VISU::TEntity(theEntity));
 }