SalomeApp_Application* app = getGeometryGUI()->getApp();
if (!app) return false;
- SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
- if ( !appStudy ) return false;
-
LightApp_SelectionMgr *Sel = app->selectionMgr();
SALOME_ListIO selected;
Sel->selectedObjects( selected );
break;
}
Sel->setSelectedObjects( selected );
- GEOM_Displayer( appStudy ).UpdateColorScale();
+ GEOM_Displayer().UpdateColorScale();
return true;
}
//=====================================================================================
void DisplayGUI::DisplayAll()
{
- SalomeApp_Application* app = getGeometryGUI()->getApp();
- if ( !app ) return;
-
- SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
- if ( !appStudy ) return;
- _PTR(Study) aStudy = appStudy->studyDS();
+ _PTR(Study) aStudy = SalomeApp_Application::getStudy();
if ( !aStudy ) return;
_PTR(SComponent) SC ( aStudy->FindComponent( "GEOM" ) );
if ( !SC )
}
anIter->Next();
}
- GEOM_Displayer( appStudy ).Display( listIO, true );
+ GEOM_Displayer().Display( listIO, true );
}
//=====================================================================================
if ( app ) {
SUIT_ViewWindow* vw = app->desktop()->activeWindow();
if ( vw ) {
- SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
SUIT_ViewManager* vman = vw->getViewManager();
if ( vman->getType() == OCCViewer_Viewer::Type() ||
vman->getType() == SVTK_Viewer::Type() ) {
- GEOM_Displayer( appStudy ).EraseAll(true);
+ GEOM_Displayer().EraseAll(true);
}
}
}
SalomeApp_Application* app = getGeometryGUI()->getApp();
if (!app) return;
- SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
- if (!anActiveStudy) return;
+ SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
+ if (!aStudy) return;
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
if (!aSelMgr) return;
for (; It.More(); It.Next()) {
Handle(SALOME_InteractiveObject) anIObject = It.Value();
if (anIObject->hasEntry()) {
- _PTR(SObject) SO (anActiveStudy->studyDS()->FindObjectID(anIObject->getEntry()));
+ _PTR(SObject) SO (aStudy->studyDS()->FindObjectID(anIObject->getEntry()));
if (SO) {
_PTR(SComponent) SC (SO->GetFatherComponent());
if (QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str())) {
// if component is selected, pass it
}
else {
- _PTR(ChildIterator) anIter (anActiveStudy->studyDS()->NewChildIterator(SO));
+ _PTR(ChildIterator) anIter (aStudy->studyDS()->NewChildIterator(SO));
anIter->InitEx(true);
while (anIter->More()) {
_PTR(SObject) valSO (anIter->Value());
}
}
}
- GEOM_Displayer(anActiveStudy).Display(listIO, true);
+ GEOM_Displayer().Display(listIO, true);
}
//=====================================================================================
SalomeApp_Application* app = getGeometryGUI()->getApp();
if ( !app ) return;
- SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
- if ( !anActiveStudy ) return;
+ SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
+ if ( !aStudy ) return;
//get SalomeApp selection manager
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
for( ;It.More();It.Next() ) {
Handle(SALOME_InteractiveObject) anIObject = It.Value();
if ( anIObject->hasEntry() ) {
- _PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
+ _PTR(SObject) SO ( aStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
_PTR(SComponent) SC ( SO->GetFatherComponent() );
// if component is selected
listIO.Clear();
- _PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
+ _PTR(ChildIterator) anIter ( aStudy->studyDS()->NewChildIterator( SO ) );
anIter->InitEx( true );
while( anIter->More() ) {
_PTR(SObject) valSO ( anIter->Value() );
listIO.Append( anIObject );
}
}
- GEOM_Displayer( anActiveStudy ).Display( listIO, true );
+ GEOM_Displayer().Display( listIO, true );
}
SalomeApp_Application* app = getGeometryGUI()->getApp();
if ( !app ) return;
- SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
- if ( !anActiveStudy ) return;
+ SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
+ if ( !aStudy ) return;
//get SalomeApp selection manager
LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
for( ; It.More(); It.Next() ) {
Handle(SALOME_InteractiveObject) anIObject = It.Value();
if ( anIObject->hasEntry() ) {
- _PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
+ _PTR(SObject) SO ( aStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
_PTR(SComponent) SC ( SO->GetFatherComponent() );
// if component is selected
listIO.Clear();
- _PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
+ _PTR(ChildIterator) anIter ( aStudy->studyDS()->NewChildIterator( SO ) );
anIter->InitEx( true );
while( anIter->More() ) {
_PTR(SObject) valSO ( anIter->Value() );
if(viewWindow->getViewManager()->getType() == SVTK_Viewer::Type())
aIsForced = false;
- GEOM_Displayer(anActiveStudy).Erase( listIO, aIsForced);
+ GEOM_Displayer().Erase( listIO, aIsForced);
getGeometryGUI()->getApp()->selectionMgr()->clearSelected();
}
SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
if ( !aStudy ) return;
- GEOM_Displayer displayer( aStudy );
+ GEOM_Displayer displayer;
int mgrId = viewWindow->getViewManager()->getGlobalId();
if ( !viewWindow )
viewWindow = app->desktop()->activeWindow();
- GEOM_Displayer displayer( aStudy );
+ GEOM_Displayer displayer;
viewWindow->setProperty( "VectorsMode", mode );
if ( !viewWindow )
viewWindow = app->desktop()->activeWindow();
- GEOM_Displayer displayer( aStudy );
+ GEOM_Displayer displayer;
viewWindow->setProperty( "VerticesMode", mode );
viewWindow->setProperty( "NameMode", mode );
- GEOM_Displayer displayer( aStudy );
+ GEOM_Displayer displayer;
int aMgrId = viewWindow->getViewManager()->getGlobalId();
aSelMgr->selectedObjects( selected );
if ( selected.IsEmpty() ) return;
- GEOM_Displayer displayer( aStudy );
+ GEOM_Displayer displayer;
int mgrId = viewWindow->getViewManager()->getGlobalId();