From 1b82ea49bff844248b80c130c4353a360519a6f7 Mon Sep 17 00:00:00 2001 From: apo Date: Mon, 25 Dec 2006 06:40:40 +0000 Subject: [PATCH] To fix regression with creation ordinary presentation --- src/VISU_I/VISU_ColoredPrs3d_i.cc | 18 +++++++++++------- src/VISU_I/VISU_ColoredPrs3d_i.hh | 5 +++++ src/VISU_I/VISU_Prs3d_i.cc | 11 ++++++----- src/VISU_I/VISU_Prs3d_i.hh | 9 +++++---- 4 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.cc b/src/VISU_I/VISU_ColoredPrs3d_i.cc index 01e20230..789ca81f 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3d_i.cc @@ -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 ); diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.hh b/src/VISU_I/VISU_ColoredPrs3d_i.hh index f715a7d3..848f927f 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.hh +++ b/src/VISU_I/VISU_ColoredPrs3d_i.hh @@ -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; diff --git a/src/VISU_I/VISU_Prs3d_i.cc b/src/VISU_I/VISU_Prs3d_i.cc index 21c28e59..777f0ac1 100644 --- a/src/VISU_I/VISU_Prs3d_i.cc +++ b/src/VISU_I/VISU_Prs3d_i.cc @@ -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 diff --git a/src/VISU_I/VISU_Prs3d_i.hh b/src/VISU_I/VISU_Prs3d_i.hh index 45805438..f1a94b43 100644 --- a/src/VISU_I/VISU_Prs3d_i.hh +++ b/src/VISU_I/VISU_Prs3d_i.hh @@ -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; -- 2.39.2