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
</ul>
-*/
\ No newline at end of file
+*/
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);
+ }
}
//=======================================================================
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 &&
}
}
+
//=======================================================================
// name : SMESHGUI_FilterDlg::onCriterionChanged
// Purpose : SLOT called when cretarion of current row changed. Update selection