#include "VisuGUI_Slider.h"
#include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+
+#include "SalomeApp_Application.h"
+#include "SalomeApp_Study.h"
#include "LightApp_SelectionMgr.h"
+#include "SVTK_Functor.h"
#include "SVTK_Renderer.h"
#include "SVTK_RenderWindowInteractor.h"
#include "VTKViewer_Algorithm.h"
-#include "SVTK_Functor.h"
#include "SALOME_ListIteratorOfListIO.hxx"
#include "VVTK_ViewWindow.h"
#include "VISU_ColoredPrs3d_i.hh"
+#include "VISU_ColoredPrs3dHolder_i.hh"
#include <vtkActorCollection.h>
#include <vtkRenderer.h>
{
myTimeStampStrings->clear();
myTimeStampIndices->clear();
+
+ if( myPrsList.size() == 0 )
+ return;
+
VISU::ColoredPrs3d_i* aPrs = myPrsList[0];
CORBA::Long aTimeStampNumber = aPrs->GetTimeStampNumber();
{
myPrsList.resize(0);
+ _PTR(SObject) aSObject;
+
+ SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>
+ (SUIT_Session::session()->activeApplication());
+
SALOME_ListIO aListIO;
mySelectionMgr->selectedObjects(aListIO);
- SALOME_ListIteratorOfListIO anIter( aListIO );
- vtkActorCollection* anActorCollection = myMainWindow->getRenderer()->GetActors();
+ SALOME_ListIteratorOfListIO anIter(aListIO);
for( int k = 0; anIter.More(); anIter.Next() )
{
- VISU_Actor* anActor =
- SVTK::Find<VISU_Actor>(anActorCollection, SVTK::TIsSameIObject<VISU_Actor>(anIter.Value()));
- if( anActor )
- {
- if( !anActor->GetVisibility() )
- continue;
-
- if( VISU::ColoredPrs3d_i* aPrs = dynamic_cast<VISU::ColoredPrs3d_i*>( anActor->GetPrs3d() ) )
- {
- if( !aPrs->IsTimeStampFixed() )
- {
- //cout << "ColoredPrs3d" << endl;
- myPrsList.resize(k+1);
- myPrsList[k] = aPrs;
- k++;
- }
+ Handle(SALOME_InteractiveObject) anIO = anIter.Value();
+ if (anIO->hasEntry()) {
+ SalomeApp_Study* theStudy = dynamic_cast<SalomeApp_Study*>(anApp->activeStudy());
+ _PTR(Study) aStudy = theStudy->studyDS();
+ aSObject = aStudy->FindObjectID(anIO->getEntry());
+
+ if (aSObject) {
+ CORBA::Object_var anObject = VISU::ClientSObjectToObject(aSObject);
+ if (!CORBA::is_nil(anObject)) {
+ VISU::ColoredPrs3dHolder_i* aHolder =
+ dynamic_cast<VISU::ColoredPrs3dHolder_i*>(VISU::GetServant(anObject).in());
+
+ if( aHolder )
+ {
+ VISU::ColoredPrs3d_i* aPrs =
+ dynamic_cast<VISU::ColoredPrs3d_i*>( VISU::GetServant(aHolder->GetDevice()).in() );
+
+ if( aPrs && !aPrs->IsTimeStampFixed() ) {
+ cout << "ColoredPrs3d" << endl;
+ myPrsList.resize(k+1);
+ myPrsList[k] = aPrs;
+ k++;
+ }
+ }
+ }
}
}
}
return aBasicInput;
}
+QString
+VISU::ColoredPrs3d_i
+::GetEntry()
+{
+ if( !myHolderEntry.isEmpty() )
+ return myHolderEntry;
+
+ return TSuperClass::GetEntry();
+}
+
//----------------------------------------------------------------------------
CORBA::Boolean
VISU::ColoredPrs3d_i
myIsTimeStampFixed = VISU::Storable::FindValue(theMap,"myIsTimeStampFixed").toInt();
OnSetInput();
+ SetHolderEntry(VISU::Storable::FindValue(theMap,"myHolderEntry").latin1());
+
Build(ERestore);
TSuperClass::Restore(theMap);
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 );