{
SALOME_Prs* aPrs = 0;
- SALOME_View* aView = theView ? theView : GetActiveView();
SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
- if(aStudy && aView){
+ if(aStudy){
_PTR(SObject) aSObject = aStudy->studyDS()->FindObjectID( (const char*)theEntry.toLatin1() );
CORBA::Object_var anObject = VISU::ClientSObjectToObject( aSObject );
if( CORBA::is_nil( anObject ) )
VISU::Base_i* aBaseServant = dynamic_cast<VISU::Base_i*>(VISU::GetServant(aBase).in());
+ SALOME_View* aView = theView ? theView : GetActiveView();
VISU::VISUType aType = aBase->GetType();
VISU::Prs3d_var aPrs3d = VISU::Prs3d::_narrow(aBase);
- if(!CORBA::is_nil(aPrs3d) || aType == VISU::TCOLOREDPRS3DHOLDER){
+ if( aView && (!CORBA::is_nil(aPrs3d) || aType == VISU::TCOLOREDPRS3DHOLDER) ){
SVTK_Viewer* aViewer = dynamic_cast<VVTK_Viewer*>( aView );
if (!aViewer)
aViewer = dynamic_cast<SVTK_Viewer*>( aView );
}
}
- SPlot2d_Viewer* aViewer = dynamic_cast<SPlot2d_Viewer*>(aView);
- if(!aViewer && (aType==VISU::TCURVE || aType==VISU::TCONTAINER || aType==VISU::TTABLE))
+ SPlot2d_Viewer* aViewer = 0;
+ if (aView) aViewer = dynamic_cast<SPlot2d_Viewer*>(aView);
+ if(!aViewer && (aType==VISU::TCURVE || aType==VISU::TCONTAINER))
if(VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>(myApp->activeModule()))
aViewer = VISU::GetPlot2dViewer( (SalomeApp_Module*)aVisuGUI, true );
aPlot2dPrs = buildContainer( aViewWindow, aContainer );
break;
}
+ case VISU::TPOINTMAP3D:
case VISU::TTABLE: {
VISU::Table_i* aTable = dynamic_cast<VISU::Table_i*>(aBaseServant);
aPlot2dPrs = buildTable( aViewWindow, aTable );
if( dynamic_cast<VISU::Curve_i*>( VISU::GetServant( anObj ).in() )
||
- dynamic_cast<VISU::Container_i*>( VISU::GetServant( anObj ).in() )
- ||
- dynamic_cast<VISU::Table_i*>(VISU::GetServant( anObj ).in() ) )
+ dynamic_cast<VISU::Container_i*>( VISU::GetServant( anObj ).in() ) )
return true;
if( viewer_type==SVTK_Viewer::Type() || viewer_type==VVTK_Viewer::Type())
return dynamic_cast<VISU::Prs3d_i*>(aBase);
}
+ else if( viewer_type==SPlot2d_Viewer::Type() )
+ {
+ VISU::Table_i* aTable = dynamic_cast<VISU::Table_i*>(VISU::GetServant( anObj ).in() );
+ return aTable;
+ }
else
return false;
}