mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 08:50:35 +05:00
0020170: EDF SMESH: Selection behaviour in object browser from hypothesis editing windows
remove filters before creation/edition of hypothesis and restore them after
This commit is contained in:
parent
efe3598bba
commit
2401f44552
@ -997,14 +997,6 @@ void SMESHGUI_MeshOp::onCreateHyp( const int theHypType, const int theIndex )
|
|||||||
createHypothesis(aDim, theHypType, aHypTypeName);
|
createHypothesis(aDim, theHypType, aHypTypeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
//================================================================================
|
|
||||||
/*!
|
|
||||||
* Create hypothesis and update dialog.
|
|
||||||
* \param theDim - dimension of hypothesis to be created
|
|
||||||
* \param theType - hypothesis category (algorithm, hypothesis, additional hypothesis)
|
|
||||||
* \param theTypeName - specifies hypothesis to be created
|
|
||||||
*/
|
|
||||||
//================================================================================
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
QString GetUniqueName (const QStringList& theHypNames,
|
QString GetUniqueName (const QStringList& theHypNames,
|
||||||
@ -1018,14 +1010,19 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* Create hypothesis and update dialog.
|
||||||
|
* \param theDim - dimension of hypothesis to be created
|
||||||
|
* \param theType - hypothesis category (algorithm, hypothesis, additional hypothesis)
|
||||||
|
* \param theTypeName - specifies hypothesis to be created
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
void SMESHGUI_MeshOp::createHypothesis (const int theDim,
|
void SMESHGUI_MeshOp::createHypothesis (const int theDim,
|
||||||
const int theType,
|
const int theType,
|
||||||
const QString& theTypeName)
|
const QString& theTypeName)
|
||||||
{
|
{
|
||||||
// During a hypothesis creation we might need to select some objects.
|
|
||||||
// Main dialog must not update it's own selected objects in this case.
|
|
||||||
dlg()->deactivateAll();
|
|
||||||
|
|
||||||
HypothesisData* aData = SMESH::GetHypothesisData(theTypeName);
|
HypothesisData* aData = SMESH::GetHypothesisData(theTypeName);
|
||||||
if (!aData)
|
if (!aData)
|
||||||
return;
|
return;
|
||||||
@ -1063,8 +1060,12 @@ void SMESHGUI_MeshOp::createHypothesis (const int theDim,
|
|||||||
// Get parameters appropriate to initialize a new hypothesis
|
// Get parameters appropriate to initialize a new hypothesis
|
||||||
SMESH::SMESH_Hypothesis_var initParamHyp =
|
SMESH::SMESH_Hypothesis_var initParamHyp =
|
||||||
getInitParamsHypothesis(theTypeName, aData->ServerLibName);
|
getInitParamsHypothesis(theTypeName, aData->ServerLibName);
|
||||||
|
|
||||||
|
int obj = myDlg->getActiveObject();
|
||||||
|
removeCustomFilters(); // Issue 0020170
|
||||||
myDlg->setEnabled( false );
|
myDlg->setEnabled( false );
|
||||||
aCreator->create(initParamHyp, aHypName, myDlg);
|
aCreator->create(initParamHyp, aHypName, myDlg);
|
||||||
|
onActivateObject( obj ); // Issue 0020170. Restore filters
|
||||||
myDlg->setEnabled( true );
|
myDlg->setEnabled( true );
|
||||||
} else {
|
} else {
|
||||||
SMESH::CreateHypothesis(theTypeName, aHypName, false);
|
SMESH::CreateHypothesis(theTypeName, aHypName, false);
|
||||||
@ -1108,13 +1109,18 @@ void SMESHGUI_MeshOp::onEditHyp( const int theHypType, const int theIndex )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator( aHyp->GetName() );
|
SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator( aHyp->GetName() );
|
||||||
if ( aCreator ) {
|
if ( aCreator )
|
||||||
|
{
|
||||||
// Get initial parameters
|
// Get initial parameters
|
||||||
SMESH::SMESH_Hypothesis_var initParamHyp =
|
SMESH::SMESH_Hypothesis_var initParamHyp =
|
||||||
getInitParamsHypothesis( aHyp->GetName(), aHyp->GetLibName());
|
getInitParamsHypothesis( aHyp->GetName(), aHyp->GetLibName());
|
||||||
myDlg->setEnabled( false );
|
|
||||||
aCreator->setInitParamsHypothesis( initParamHyp );
|
aCreator->setInitParamsHypothesis( initParamHyp );
|
||||||
|
|
||||||
|
int obj = myDlg->getActiveObject();
|
||||||
|
removeCustomFilters(); // Issue 0020170
|
||||||
|
myDlg->setEnabled( false );
|
||||||
aCreator->edit( aHyp.in(), aHypItem.second, dlg() );
|
aCreator->edit( aHyp.in(), aHypItem.second, dlg() );
|
||||||
|
onActivateObject( obj ); // Issue 0020170. Restore filters
|
||||||
myDlg->setEnabled( true );
|
myDlg->setEnabled( true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user