Salome HOME
projects
/
modules
/
hexablock.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switch development flag to 1
[modules/hexablock.git]
/
src
/
HEXABLOCKGUI
/
HEXABLOCKGUI_SalomeTools.cxx
diff --git
a/src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.cxx
b/src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.cxx
index 814b49426b743bddc9f85f47878f964077f9f8af..1dae5ca782ea2dfdedc600aabb0c3e7088aaa9be 100644
(file)
--- a/
src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.cxx
+++ b/
src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2009-201
4
CEA/DEN, EDF R&D
+// Copyright (C) 2009-201
6
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
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-28,11
+28,8
@@
#include <vtkActorCollection.h>
#include <vtkUnstructuredGrid.h>
#include <vtkActorCollection.h>
#include <vtkUnstructuredGrid.h>
-
-
#include <SUIT_Session.h>
#include <SUIT_Session.h>
-#include <SalomeApp_Study.h>
#include <SalomeApp_Application.h>
#include <OCCViewer_ViewWindow.h>
#include <SalomeApp_Application.h>
#include <OCCViewer_ViewWindow.h>
@@
-89,13
+86,12
@@
namespace GUI
}
}
- _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;
}
}
@@
-175,7
+171,10
@@
namespace GUI
Handle(SelectMgr_Selection) sel = theObj->Selection( m );
for ( sel->Init(); sel->More(); sel->Next() ) {
Handle(SelectMgr_Selection) sel = theObj->Selection( m );
for ( sel->Init(); sel->More(); sel->Next() ) {
- Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive();
+ const Handle(SelectMgr_SensitiveEntity) aHSenEntity = sel->Sensitive();
+ if ( aHSenEntity.IsNull() )
+ continue;
+ Handle(SelectBasics_SensitiveEntity) entity = aHSenEntity->BaseSensitive();
if ( entity.IsNull() )
continue;
if ( entity.IsNull() )
continue;