Updated for bug IPAL19474.

This commit is contained in:
skl 2008-06-23 07:56:20 +00:00
parent 25dc346fe7
commit aa7d5e89a0
2 changed files with 17 additions and 1 deletions

View File

@ -42,6 +42,9 @@ the whole \b Mesh, the <b>Initial Selection</b> or the <b>Current Group</b>.
existing filter from <b>Selection filter library</b> and <b>Add
to...</b> button gives you a possibility to save your current filter
in the Library.
\n <b>Note:</b> If button <b>Apply and Close</b> is disabled, there
is no selected mesh in Object Browser and the filter can not be
created. You have to select the mesh and the button will be enabled.
\image html a-filteronedges.png
@ -150,4 +153,4 @@ the point of view of MED convention.
</ul>
*/
*/

View File

@ -2192,6 +2192,10 @@ void SMESHGUI_FilterDlg::SetSourceWg (QWidget* theWg)
void SMESHGUI_FilterDlg::SetMesh (SMESH::SMESH_Mesh_var theMesh)
{
myMesh = theMesh;
if ( myMesh->_is_nil() ) {
myButtons[BTN_OK]->setEnabled(false);
myButtons[BTN_Apply]->setEnabled(false);
}
}
//=======================================================================
@ -2526,6 +2530,14 @@ void SMESHGUI_FilterDlg::onSelectionDone()
int aRow, aCol;
const SALOME_ListIO& aList = mySelector->StoredIObjects();
if ( myMesh->_is_nil() && aList.Extent()>0 ) {
myMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(aList.First());
if ( !(myMesh->_is_nil()) ) {
myButtons[BTN_OK]->setEnabled(true);
myButtons[BTN_Apply]->setEnabled(true);
}
}
if (aList.Extent() != 1 ||
!myTable->CurrentCell(aRow, aCol) ||
myTable->GetCriterionType(aRow) != FT_BelongToGeom &&
@ -2545,6 +2557,7 @@ void SMESHGUI_FilterDlg::onSelectionDone()
}
}
//=======================================================================
// name : SMESHGUI_FilterDlg::onCriterionChanged
// Purpose : SLOT called when cretarion of current row changed. Update selection