mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-26 16:10:33 +05:00
PAL10501. SetCurrentStudy() to SMESH_Gen in GetSMESHGen()
This commit is contained in:
parent
2df8c2d513
commit
4fe88e90a7
@ -184,7 +184,6 @@ namespace{
|
|||||||
if(!filename.isEmpty()) {
|
if(!filename.isEmpty()) {
|
||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
_PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
|
_PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
|
||||||
theComponentMesh->SetCurrentStudy( _CAST(Study,aStudy)->GetStudy() );
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
SMESH::mesh_array_var aMeshes = new SMESH::mesh_array;
|
SMESH::mesh_array_var aMeshes = new SMESH::mesh_array;
|
||||||
@ -1063,10 +1062,6 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
if( !mgr )
|
if( !mgr )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (CORBA::is_nil(GetSMESHGen()->GetCurrentStudy())) {
|
|
||||||
GetSMESHGen()->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy());
|
|
||||||
}
|
|
||||||
|
|
||||||
SUIT_ViewWindow* view = application()->desktop()->activeWindow();
|
SUIT_ViewWindow* view = application()->desktop()->activeWindow();
|
||||||
SVTK_ViewWindow* vtkwnd = dynamic_cast<SVTK_ViewWindow*>( view );
|
SVTK_ViewWindow* vtkwnd = dynamic_cast<SVTK_ViewWindow*>( view );
|
||||||
|
|
||||||
@ -2807,11 +2802,16 @@ void SMESHGUI::OnGUIEvent()
|
|||||||
|
|
||||||
SMESH::SMESH_Gen_var SMESHGUI::GetSMESHGen()
|
SMESH::SMESH_Gen_var SMESHGUI::GetSMESHGen()
|
||||||
{
|
{
|
||||||
|
_PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); //Document OCAF de l'etude active
|
||||||
if ( CORBA::is_nil( myComponentSMESH ) )
|
if ( CORBA::is_nil( myComponentSMESH ) )
|
||||||
{
|
{
|
||||||
SMESHGUI aGUI; //SRN BugID: IPAL9186: Create an instance of SMESHGUI to initialize myComponentSMESH
|
SMESHGUI aGUI; //SRN BugID: IPAL9186: Create an instance of SMESHGUI to initialize myComponentSMESH
|
||||||
|
if ( aStudy )
|
||||||
|
aGUI.myComponentSMESH->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy());
|
||||||
return aGUI.myComponentSMESH;
|
return aGUI.myComponentSMESH;
|
||||||
}
|
}
|
||||||
|
if ( aStudy )
|
||||||
|
myComponentSMESH->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy());
|
||||||
return myComponentSMESH;
|
return myComponentSMESH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user