{
isThresholdEditable = true;
}
+ if ( !isThresholdEditable )
+ {
+ aTable->setItem( row, 2, new QTableWidgetItem() );
+ }
aTable->setEditable( isThresholdEditable, row, 2);
aCriteria[ i ] = aCriterion;
}
+ if ( !myFilter[ theType ]->_is_nil() )
+ myFilter[ theType ]->UnRegister();
myFilter[ theType ] = aFilterMgr->CreateFilter();
myFilter[ theType ]->SetCriteria(aCriteria.inout());
void SMESHGUI_FilterDlg::SetFilter(SMESH::Filter_var filter, int type)
{
+ if ( !filter->_is_nil() )
+ filter->Register();
+ if ( !myFilter[ type ]->_is_nil() )
+ myFilter[ type ]->UnRegister();
+
myFilter[ type ] = filter;
}
+//================================================================================
+/*!
+ * \brief call UnRegister() for myFilter's
+ */
+//================================================================================
+
+void SMESHGUI_FilterDlg::UnRegisterFilters()
+{
+ QMap< int, SMESH::Filter_var >::iterator i_f = myFilter.begin();
+ for ( ; i_f != myFilter.end(); ++i_f )
+ if ( !i_f.value()->_is_nil() )
+ i_f.value()->UnRegister();
+ myFilter.clear();
+}
+
//=======================================================================
// name : SMESHGUI_FilterDlg::insertFilterInViewer
// Purpose : Insert filter in viewer