X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_GroupOnShapeDlg.cxx;h=aaf5f6801e7816bc65f882f23fd720d2da8bf6dc;hp=258084e05a8228384a6a8b4a1e658b3347844c83;hb=264eeb2edd6977ccf2d2bd88cbb210353f63f7c9;hpb=6bac08c1a81f34d3f21c550bd92f83654b2546a5 diff --git a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx index 258084e05..aaf5f6801 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -219,13 +219,12 @@ static SMESH::ElementType elementType(GEOM::GEOM_Object_var geom) case GEOM::COMPOUND: break; default: return SMESH::ALL; } - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); GEOM::GEOM_IShapesOperations_wrap aShapeOp = - SMESH::GetGEOMGen()->GetIShapesOperations(aStudy->StudyId()); + SMESH::GetGEOMGen()->GetIShapesOperations(); if ( geom->GetType() == 37 ) { // geom group GEOM::GEOM_IGroupOperations_wrap aGroupOp = - SMESH::GetGEOMGen()->GetIGroupOperations(aStudy->StudyId()); + SMESH::GetGEOMGen()->GetIGroupOperations(); if ( !aGroupOp->_is_nil() ) { // mainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap GEOM::GEOM_Object_var mainShape = aGroupOp->GetMainShape( geom ); @@ -296,11 +295,11 @@ bool SMESHGUI_GroupOnShapeOp::onApply() { SUIT_OverrideCursor aWaitCursor; - if (isStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; // study - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); if ( !aStudy ) return false; // mesh @@ -460,7 +459,7 @@ void SMESHGUI_GroupOnShapeOp::selectionDone() QStringList goodNames, goodIds; if (nbSelected > 0) { // study - if (_PTR(Study) aStudy = SMESH::GetActiveStudyDocument()) { + if (_PTR(Study) aStudy = SMESH::getStudy()) { // mesh if (_PTR(SObject) meshSO = aStudy->FindObjectID( myMeshID.toLatin1().data() )) { // shape to mesh