myDlg->show();
selectionDone();
+
+ myIgnoreAlgoSelection = false;
}
//================================================================================
}
else
{
- selectObject( _PTR(SObject)() );
myDlg->selectObject( "", SMESHGUI_MeshDlg::Geom, "" );
+ selectObject( _PTR(SObject)() );
+ selectionDone();
}
}
if (aTopDim == -1)
return;
+ const bool isSubmesh = ( myToCreate ? !myIsMesh : myDlg->isObjectShown( SMESHGUI_MeshDlg::Mesh ));
+
HypothesisData* algoData = hypData( aDim, Algo, theIndex );
HypothesisData* algoByDim[3];
algoByDim[ aDim ] = algoData;
// restore previously selected algo
algoIndex = myAvailableHypData[dim][Algo].findIndex( curAlgo );
- if ( algoIndex < 0 && soleCompatible )
+ if ( !isSubmesh && algoIndex < 0 && soleCompatible )
// select the sole compatible algo
algoIndex = myAvailableHypData[dim][Algo].findIndex( soleCompatible );
setCurrentHyp( dim, Algo, algoIndex );
int hypIndex = -1;
if ( !curHyp->_is_nil() && !anExisting.isEmpty() )
hypIndex = this->find( curHyp, myExistingHyps[ dim ][ type ]);
- if ( hypIndex < 0 && anExisting.count() == 1 ) {
+ if ( !isSubmesh && hypIndex < 0 && anExisting.count() == 1 ) {
// none is yet selected => select the sole existing if it is not optional
QString hypTypeName = myExistingHyps[ dim ][ type ][ 0 ]->GetName();
bool isOptional = true;
//================================================================================
/*!
* \brief Creates and selects hypothesis of hypotheses set
- * \param theSetName - The name of hypotheses set
+ * \param theSetName - The name of hypotheses set
*/
//================================================================================
void SMESHGUI_MeshOp::onHypoSet( const QString& theSetName )
}
}
}
+
+ // deselect geometry: next submesh sould be created on other subshape
+ myDlg->selectObject( "", SMESHGUI_MeshDlg::Geom, "" );
+ selectObject( _PTR(SObject)() );
+ selectionDone();
+
return true;
}