mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-26 07:20:34 +05:00
PAL10953. Use GUI to create hypothesis from a hypotheses set
This commit is contained in:
parent
e019559d0b
commit
e884fc2507
@ -632,6 +632,7 @@ void SMESHGUI_MeshOp::onHypoSet( const QString& theSetName )
|
|||||||
{
|
{
|
||||||
const QString& aHypoTypeName = (*aHypoList)[ i ];
|
const QString& aHypoTypeName = (*aHypoList)[ i ];
|
||||||
HypothesisData* aHypData = SMESH::GetHypothesisData( aHypoTypeName );
|
HypothesisData* aHypData = SMESH::GetHypothesisData( aHypoTypeName );
|
||||||
|
if ( !aHypData ) continue;
|
||||||
int aDim = aHypData->Dim[0];
|
int aDim = aHypData->Dim[0];
|
||||||
// create or/and set
|
// create or/and set
|
||||||
int index = -1;
|
int index = -1;
|
||||||
@ -657,12 +658,23 @@ void SMESHGUI_MeshOp::onHypoSet( const QString& theSetName )
|
|||||||
}
|
}
|
||||||
if ( index >= 0 ) // found
|
if ( index >= 0 ) // found
|
||||||
{
|
{
|
||||||
|
// select an algorithm
|
||||||
setCurrentHyp ( aDim, aHypType, index );
|
setCurrentHyp ( aDim, aHypType, index );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// silently create a hypothesis
|
// create a hypothesis
|
||||||
SMESH::CreateHypothesis( aHypoTypeName, aHypData->Label, isAlgo );
|
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;
|
QStringList aNewHyps;
|
||||||
_PTR(SComponent) aFather = SMESH::GetActiveStudyDocument()->FindComponent( "SMESH" );
|
_PTR(SComponent) aFather = SMESH::GetActiveStudyDocument()->FindComponent( "SMESH" );
|
||||||
existingHyps( aDim, aHypType, aFather, aNewHyps, aList );
|
existingHyps( aDim, aHypType, aFather, aNewHyps, aList );
|
||||||
|
Loading…
Reference in New Issue
Block a user