return result; // entry of an atom for sure
}
-ATOMGEN_ORB::Atom_ptr getAtom( const QString& entry, const int studyID, double& temprature )
+ATOMGEN_ORB::Atom_ptr getAtom( const QString& entry, double& temprature )
{
QStringList es = entry.split( "_" );
ATOMSOLV_ORB::ATOMSOLV_Gen_var engine = ATOMSOLVGUI::GetATOMSOLVGen();
ATOMSOLV_ORB::TMoleculeList_var molecules;
- if ( engine->getData( studyID, molecules ) && molID >= 0 && molID < molecules->length() ) {
+ if ( engine->getData( molecules ) && molID >= 0 && molID < molecules->length() ) {
ATOMSOLV_ORB::TMolecule tmol = molecules[ molID ];
ATOMGEN_ORB::Molecule_var mol = tmol.molecule;
if ( atomID < mol->getNbAtoms() ) {
}
}
-int getStudyID()
-{
- int studyID = -1;
- if ( SUIT_Application* app = SUIT_Session::session()->activeApplication() )
- if ( SUIT_Study* study = app->activeStudy() )
- studyID = study->id();
- return studyID;
-}
-
SALOME_Prs* ATOMSOLVGUI_Displayer::buildPresentation( const QString& entry, SALOME_View* view )
{
- const int studyID = getStudyID();
- if ( studyID == -1 )
- return 0;
-
SVTK_Prs* prs = dynamic_cast<SVTK_Prs*>( LightApp_Displayer::buildPresentation( entry, view ) );
if ( !prs ) return 0;
double temperature;
- ATOMGEN_ORB::Atom_var atom = getAtom( entry, studyID, temperature );
+ ATOMGEN_ORB::Atom_var atom = getAtom( entry, temperature );
if ( !CORBA::is_nil( atom ) ) {
// PRESENTATION FOR OCC VIEWER
void ATOMSOLVGUI_Displayer::updateActor( SALOME_Actor* actor )
{
- const int studyID = getStudyID();
- if ( actor && actor->hasIO() && studyID >= 0 ) {
+ if ( actor && actor->hasIO() ) {
double temperature;
- getAtom( actor->getIO()->getEntry(), studyID, temperature );
+ getAtom( actor->getIO()->getEntry(), temperature );
setTemperature( actor, temperature );
actor->Update();
}