]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To fix regression with creation ordinary presentation WP1_2_3_25-12-2006_persistent_for_cache
authorapo <apo@opencascade.com>
Mon, 25 Dec 2006 06:40:40 +0000 (06:40 +0000)
committerapo <apo@opencascade.com>
Mon, 25 Dec 2006 06:40:40 +0000 (06:40 +0000)
src/VISU_I/VISU_ColoredPrs3d_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.hh
src/VISU_I/VISU_Prs3d_i.cc
src/VISU_I/VISU_Prs3d_i.hh

index 01e20230fe01d5a88e027c043edfa684f7e2c665..789ca81f9280e3dad23bb82f34c66c59ff1bf4a7 100644 (file)
@@ -375,7 +375,6 @@ VISU::ColoredPrs3d_i
 ::SetHolderEntry(const std::string& theEntry)
 {
   myHolderEntry = theEntry;
-  SetIO(new SALOME_InteractiveObject(theEntry.c_str(), "VISU", GetName().c_str()));
 }
 
 
@@ -388,6 +387,17 @@ VISU::ColoredPrs3d_i
 }
 
 
+//----------------------------------------------------------------------------
+std::string
+VISU::ColoredPrs3d_i
+::GetActorEntry()
+{
+  if(myHolderEntry != "")
+    return myHolderEntry;
+  return TSuperClass::GetActorEntry();
+}
+
+
 //----------------------------------------------------------------------------
 CORBA::Boolean 
 VISU::ColoredPrs3d_i
@@ -451,8 +461,6 @@ VISU::ColoredPrs3d_i
 
     UseFixedRange( anOrigin->IsRangeFixed() );
     myIsTimeStampFixed = anOrigin->IsTimeStampFixed();
-
-    SetHolderEntry( anOrigin->GetHolderEntry() );
   }
 }
   
@@ -1049,8 +1057,6 @@ VISU::ColoredPrs3d_i
   myIsTimeStampFixed = VISU::Storable::FindValue(theMap,"myIsTimeStampFixed").toInt();
   OnSetInput(false);
 
-  SetHolderEntry(VISU::Storable::FindValue(theMap,"myHolderEntry").latin1());
-
   Build(ERestore);
 
   SetScalarMode(VISU::Storable::FindValue(theMap,"myScalarMode").toInt());
@@ -1095,8 +1101,6 @@ VISU::ColoredPrs3d_i
   Storable::DataToStream( theStr, "myIteration",      int(GetTimeStampNumber()) );
   Storable::DataToStream( theStr, "myIsTimeStampFixed", int(myIsTimeStampFixed) );
 
-  Storable::DataToStream( theStr, "myHolderEntry",    myHolderEntry );
-
   Storable::DataToStream( theStr, "myScalarMode",     int(GetScalarMode()) );
   Storable::DataToStream( theStr, "myNumberOfColors", int(GetNbColors()) );
   Storable::DataToStream( theStr, "myOrientation",    myOrientation );
index f715a7d389c681df45a64b53908f5fc915be22b8..848f927fb96648c37876fe619ac3b3db27eaccee 100644 (file)
@@ -432,6 +432,11 @@ namespace VISU
     std::string 
     GetScalarBarTitle();
 
+    //! Used in derived classes to initilize the IO for actors
+    virtual
+    std::string
+    GetActorEntry();
+
   private:
     // Decalare basic input parameters
     VISU::Entity myEntity;
index 21c28e591802eeacdc5d6263e35c24ce85d6fa66..777f0ac16a7c0cb81550373aea498b1f7092697f 100644 (file)
@@ -309,7 +309,7 @@ VISU::Prs3d_i
 ::GetSObject()
 {
   const SALOMEDS::Study_var& aStudy = GetStudyDocument();
-  if(CORBA::is_nil(aStudy.in())){
+  if(!CORBA::is_nil(aStudy.in())){
     CORBA::String_var anIOR = GetID();
     return aStudy->FindObjectIOR(anIOR);
   }
@@ -440,19 +440,20 @@ VISU::Prs3d_i
 ::GetIO()
 {
   if( myIO.IsNull() )
-    myIO = new SALOME_InteractiveObject(GetEntry().c_str(), "VISU", GetName().c_str());
+    myIO = new SALOME_InteractiveObject(GetActorEntry().c_str(), "VISU", GetName().c_str());
 
   return myIO;
 }
 
 //----------------------------------------------------------------------------
-void
+std::string
 VISU::Prs3d_i
-::SetIO(const Handle(SALOME_InteractiveObject)& theIO)
+::GetActorEntry()
 {
-  myIO = theIO;
+  return GetEntry();
 }
 
+
 //----------------------------------------------------------------------------
 void
 VISU::Prs3d_i
index 45805438ba16f744759f099dab4dfddecd331ac7..f1a94b43b9bcac8b06577918bc2572472c582233 100644 (file)
@@ -309,14 +309,15 @@ namespace VISU
     void
     CheckDataSet();
 
-    //! Used in derived classes to initilize the myIO member
-    void
-    SetIO(const Handle(SALOME_InteractiveObject)& theIO);
-
   protected:
     vtkTimeStamp myUpdateTime;
     vtkTimeStamp myParamsTime;
 
+    //! Used in derived classes to initilize the IO for actors
+    virtual
+    std::string
+    GetActorEntry();
+
   private:
     bool myIsRestored;
     SALOMEDS::Study_var myRestoringStudy;