-// Copyright (C) 2009-2015 CEA/DEN, EDF R&D
+// Copyright (C) 2009-2016 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <vtkActorCollection.h>
#include <vtkUnstructuredGrid.h>
-#include <Basics_OCCTVersion.hxx>
-
#include <SUIT_Session.h>
-#include <SalomeApp_Study.h>
#include <SalomeApp_Application.h>
#include <OCCViewer_ViewWindow.h>
}
- _PTR(Study) GetActiveStudyDocument()
+ _PTR(Study) getStudy()
{
- SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(GetActiveStudy());
- if (aStudy)
- return aStudy->studyDS();
- else
- return _PTR(Study)();
+ static _PTR(Study) _study;
+ if(!_study)
+ _study = SalomeApp_Application::getStudy();
+ return _study;
}
Handle(SelectMgr_Selection) sel = theObj->Selection( m );
for ( sel->Init(); sel->More(); sel->Next() ) {
-#if OCC_VERSION_LARGE > 0x06080100
const Handle(SelectMgr_SensitiveEntity) aHSenEntity = sel->Sensitive();
if ( aHSenEntity.IsNull() )
continue;
Handle(SelectBasics_SensitiveEntity) entity = aHSenEntity->BaseSensitive();
-#else
- Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive();
-#endif
if ( entity.IsNull() )
continue;