X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MeshOp.cxx;h=716d21e612280ff73d788a93f47ac4b4c9615825;hp=9c5f9bed5bb0811e2bb6c985954ce8842801412d;hb=e884fc2507d46c805b15dfa633f4326c821c2d8c;hpb=2754c581d371f9bf52b3c538a7bde55f10f6523c diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 9c5f9bed5..716d21e61 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -632,6 +632,7 @@ void SMESHGUI_MeshOp::onHypoSet( const QString& theSetName ) { const QString& aHypoTypeName = (*aHypoList)[ i ]; HypothesisData* aHypData = SMESH::GetHypothesisData( aHypoTypeName ); + if ( !aHypData ) continue; int aDim = aHypData->Dim[0]; // create or/and set int index = -1; @@ -657,12 +658,23 @@ void SMESHGUI_MeshOp::onHypoSet( const QString& theSetName ) } if ( index >= 0 ) // found { + // select an algorithm setCurrentHyp ( aDim, aHypType, index ); } else { - // silently create a hypothesis - SMESH::CreateHypothesis( aHypoTypeName, aHypData->Label, isAlgo ); + // create a hypothesis + QString aClientLibName = aHypData->ClientLibName; + if ( aClientLibName == "" ) { + // Call hypothesis creation server method (without GUI) + SMESH::CreateHypothesis( aHypoTypeName, aHypData->Label, isAlgo ); + } + else { + // Get hypotheses creator client (GUI) + SMESHGUI_GenericHypothesisCreator* aCreator = + SMESH::GetHypothesisCreator( aHypoTypeName ); + aCreator->CreateHypothesis( false, myDlg ); + } QStringList aNewHyps; _PTR(SComponent) aFather = SMESH::GetActiveStudyDocument()->FindComponent( "SMESH" ); existingHyps( aDim, aHypType, aFather, aNewHyps, aList );