Salome HOME
Remove unused variables
[modules/visu.git] / src / VISU_I / VISU_ScalarMap_i.cc
index 96beba4d0b59643604d023c0545083bd44ec3832..2fbf7b591da9fcca3b1e34ec07096530b58af40c 100644 (file)
@@ -38,10 +38,8 @@ using namespace std;
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
 #else
 static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
 #endif
 
 static int INCMEMORY = 4;
@@ -201,7 +199,6 @@ VISU::Storable* VISU::ScalarMap_i::Create(const char* theMeshName, VISU::Entity
   myIsFixedRange = (aFixRange.compare("true") == 0);
 
   if(myIsFixedRange){
-    float aScalarRange[2];
     QString aRangeMin = QAD_CONFIG->getSetting("Visu:SBMinimumValue");
     float aMin = (aRangeMin.isEmpty())? 0 : aRangeMin.toFloat();
     QString aRangeMax = QAD_CONFIG->getSetting("Visu:SBMaximumValue");
@@ -435,7 +432,7 @@ VISU::Storable* VISU::ScalarMap_i::Build(int theRestoring){
   try{
     if(myResult->GetInput() == NULL) 
       throw std::runtime_error("Mesh_i::Build - myResult->GetInput() == NULL !!!");
-    myField = &(myResult->GetInput()->GetField(myMeshName,myEntity,myFieldName));
+    myField = myResult->GetInput()->GetField(myMeshName,myEntity,myFieldName);
     if(myField == NULL) throw std::runtime_error("There is no Field with the parameters !!!");
     VISU_Convertor::TOutput *anOutput = 
       myResult->GetInput()->GetTimeStampOnMesh(myMeshName,myEntity,myFieldName,myIteration);
@@ -447,9 +444,9 @@ VISU::Storable* VISU::ScalarMap_i::Build(int theRestoring){
     if(theRestoring <= 0){
       if(theRestoring == 0) myScalarMapPL->Init();
       if(!myIsFixedRange) myScalarMapPL->SetSourceRange();
-      const VISU::TField::TValField& aValField = myField->myValField;
-      const VISU::TField::TValForTime& aValForTime = aValField.find(myIteration)->second;
-      aComment.sprintf("%s %s",myFieldName.c_str(),VISU_Convertor::GenerateName(aValForTime.myTime).c_str());
+      const VISU::TValField& aValField = myField->myValField;
+      const VISU::PValForTime aValForTime = aValField.find(myIteration)->second;
+      aComment.sprintf("%s %s",myFieldName.c_str(),VISU_Convertor::GenerateName(aValForTime->myTime).c_str());
       if (theRestoring == 0) myTitle = aComment.simplifyWhiteSpace().latin1();
     }
     if(myAddToStudy){
@@ -458,7 +455,7 @@ VISU::Storable* VISU::ScalarMap_i::Build(int theRestoring){
                       VISU::TTIMESTAMP,myMeshName.c_str(),myEntity,myFieldName.c_str(),myIteration,myField->myNbComp);
       string aResultEntry = myResult->GetEntry();
       string aRefFatherEntry = myResult->GetRefFatherEntry();
-      string anEntry = FindEntryWithComment(myStudy,aResultEntry.c_str(),aComment.latin1());
+      string anEntry = myResult->GetEntry(aComment.latin1());
       if(anEntry == "") throw std::runtime_error("There is no Entry for binding the presentation !!!");
       aComment.sprintf("myComment=%s;myMeshName=%s;myEntityId=%d;myFieldName=%s;myTimeStampId=%d;myNumComponent=%d",
                       GetComment(),myMeshName.c_str(),myEntity,myFieldName.c_str(),myIteration,myField->myNbComp);
@@ -502,7 +499,6 @@ VISU_Actor* VISU::ScalarMap_i::CreateActor(const Handle(SALOME_InteractiveObject
     VISU::Prs3d_i::CreateActor(anActor,theIO);
     anActor->SetBarVisibility(true);
     anActor->SetRepresentation(2);
-    anActor->myFieldName = myFieldName;
     UpdateActor(anActor);
   }catch(...) {
     anActor->Delete();