#include "VisuGUI_Displayer.h"
+#include "VisuGUI.h"
#include "VisuGUI_Tools.h"
#include "VISU_ViewManager_i.hh"
#include "VISU_Actor.h"
}
}
- if(SPlot2d_Viewer* aViewer = dynamic_cast<SPlot2d_Viewer*>(aView)){
+ SPlot2d_Viewer* aViewer = dynamic_cast<SPlot2d_Viewer*>(aView);
+ if(!aViewer && (aType==VISU::TCURVE || aType==VISU::TCONTAINER || aType==VISU::TTABLE))
+ if(VisuGUI* aVisuGUI = dynamic_cast<VisuGUI*>(myApp->activeModule()))
+ aViewer = VISU::GetPlot2dViewer( (SalomeApp_Module*)aVisuGUI, true );
+
+ if(aViewer){
SUIT_ViewManager* aViewManager = aViewer->getViewManager();
SUIT_ViewWindow* aWindow = aViewManager->getActiveView();
Plot2d_ViewWindow* aViewWindow = dynamic_cast<Plot2d_ViewWindow*>( aWindow );
if( study->isComponent( entry ) )
return true;
+ 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() ) )
+ return true;
+
if( viewer_type==SVTK_Viewer::Type() || viewer_type==VVTK_Viewer::Type())
{
VISU::Base_i* aBase = dynamic_cast<VISU::Base_i*>(VISU::GetServant(anObj).in());
return dynamic_cast<VISU::Prs3d_i*>(aBase);
}
- else if( viewer_type==SPlot2d_Viewer::Type() )
- {
- VISU::Curve_i* aCurve = dynamic_cast<VISU::Curve_i*>( VISU::GetServant( anObj ).in() );
- VISU::Container_i* aCont = dynamic_cast<VISU::Container_i*>( VISU::GetServant( anObj ).in() );
- VISU::Table_i* aTable = dynamic_cast<VISU::Table_i*>(VISU::GetServant( anObj ).in() );
- return aCurve || aCont || aTable;
- }
else
return false;
}