mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-15 21:03:07 +05:00
fix assignation of a set of hypotheses
This commit is contained in:
parent
b28dc98b3a
commit
53781e4054
@ -1114,13 +1114,16 @@ void SMESHGUI_MeshOp::onHypoSet( const QString& theSetName )
|
|||||||
HypothesesSet* aHypoSet = SMESH::GetHypothesesSet(theSetName);
|
HypothesesSet* aHypoSet = SMESH::GetHypothesesSet(theSetName);
|
||||||
if (!aHypoSet) return;
|
if (!aHypoSet) return;
|
||||||
|
|
||||||
|
// clear all hyps
|
||||||
|
for (int dim = SMESH::DIM_1D; dim <= SMESH::DIM_3D; dim++) {
|
||||||
|
setCurrentHyp(dim, Algo, -1);
|
||||||
|
setCurrentHyp(dim, AddHyp, -1);
|
||||||
|
setCurrentHyp(dim, MainHyp, -1);
|
||||||
|
}
|
||||||
|
|
||||||
for (int aHypType = Algo; aHypType < AddHyp; aHypType++) {
|
for (int aHypType = Algo; aHypType < AddHyp; aHypType++) {
|
||||||
bool isAlgo = (aHypType == Algo);
|
bool isAlgo = (aHypType == Algo);
|
||||||
|
|
||||||
// clear all hyps
|
|
||||||
for (int dim = SMESH::DIM_1D; dim <= SMESH::DIM_3D; dim++)
|
|
||||||
setCurrentHyp(dim, aHypType, -1);
|
|
||||||
|
|
||||||
// set hyps from the set
|
// set hyps from the set
|
||||||
QStringList* aHypoList = isAlgo ? &aHypoSet->AlgoList : &aHypoSet->HypoList;
|
QStringList* aHypoList = isAlgo ? &aHypoSet->AlgoList : &aHypoSet->HypoList;
|
||||||
for (int i = 0, n = aHypoList->count(); i < n; i++) {
|
for (int i = 0, n = aHypoList->count(); i < n; i++) {
|
||||||
@ -1132,9 +1135,13 @@ void SMESHGUI_MeshOp::onHypoSet( const QString& theSetName )
|
|||||||
int aDim = aHypData->Dim[0];
|
int aDim = aHypData->Dim[0];
|
||||||
// create or/and set
|
// create or/and set
|
||||||
if (isAlgo) {
|
if (isAlgo) {
|
||||||
QStringList tmp;
|
|
||||||
availableHyps( aDim, Algo, tmp, myAvailableHypData[aDim][Algo] );
|
|
||||||
int index = myAvailableHypData[aDim][Algo].findIndex( aHypData );
|
int index = myAvailableHypData[aDim][Algo].findIndex( aHypData );
|
||||||
|
if ( index < 0 ) {
|
||||||
|
QStringList anAvailable;
|
||||||
|
availableHyps( aDim, Algo, anAvailable, myAvailableHypData[aDim][Algo] );
|
||||||
|
myDlg->tab( aDim )->setAvailableHyps( Algo, anAvailable );
|
||||||
|
index = myAvailableHypData[aDim][Algo].findIndex( aHypData );
|
||||||
|
}
|
||||||
setCurrentHyp( aDim, Algo, index );
|
setCurrentHyp( aDim, Algo, index );
|
||||||
onAlgoSelected( index, aDim );
|
onAlgoSelected( index, aDim );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user