void VisuGUI::ChangeRepresentation (VISU::PresentationType theType)
{
- SVTK_ViewWindow* vw = GetViewWindow();
- if (!vw) return;
+ SUIT_ViewWindow* aView = GetActiveView(this, VTKViewer_Viewer::Type());
+ if (!aView) return;
+ SVTK_ViewWindow* vw = (SVTK_ViewWindow*) aView;
Handle(SALOME_InteractiveObject) anIO;
CORBA::Object_var anObject = GetSelectedObj(this, &anIO);
return NULL;
}
+
+ //************************************************************
+ SUIT_ViewWindow* GetActiveView(const SalomeApp_Module* theModule, QString theType)
+ {
+ if(SalomeApp_Application* anApp = theModule->getApp()){
+ if(SUIT_ViewManager* aViewManager = anApp->activeViewManager()){
+ if (!theType.isNull()) {
+ if (aViewManager->getType() != theType)
+ return 0;
+ }
+ return aViewManager->getActiveView();
+ }
+ }
+ return 0;
+ }
+
+
+ //************************************************************
SVTK_ViewWindow*
GetViewWindow()
{
#include CORBA_SERVER_HEADER(MED_Gen)
class SUIT_Desktop;
+class SUIT_ViewWindow;
class VISU_Actor;
class SVTK_ViewWindow;
class SPlot2d_Viewer;
VISU::Storable::TRestoringMap getMapOfValue(_PTR(SObject) theSObject);
QString getValue(SALOMEDS::SObject_var theSObject, QString theKey);
QString getValue(_PTR(SObject) theSObject, QString theKey);
+
SVTK_ViewWindow* GetViewWindow(const SalomeApp_Module* theModule, const bool theCreate = false );
SVTK_ViewWindow* GetViewWindow();
+ SUIT_ViewWindow* GetActiveView(const SalomeApp_Module* theModule, QString theType = QString::null);
+
VISU_Actor* PublishInView(const SalomeApp_Module* theModule,
VISU::Prs3d_i* thePrs);
VISU_Actor* UpdateViewer(const SalomeApp_Module* theModule,