mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
SALOME Forum bug: sub-mesh removal leads to an Exception in a re-opened study.
+ void UnRegisterFilters();
This commit is contained in:
parent
91084ee58a
commit
6a8e2f83ff
@ -1970,6 +1970,10 @@ void SMESHGUI_FilterTable::onCriterionChanged (const int row, const int col, con
|
|||||||
{
|
{
|
||||||
isThresholdEditable = true;
|
isThresholdEditable = true;
|
||||||
}
|
}
|
||||||
|
if ( !isThresholdEditable )
|
||||||
|
{
|
||||||
|
aTable->setItem( row, 2, new QTableWidgetItem() );
|
||||||
|
}
|
||||||
aTable->setEditable( isThresholdEditable, row, 2);
|
aTable->setEditable( isThresholdEditable, row, 2);
|
||||||
|
|
||||||
|
|
||||||
@ -3323,6 +3327,8 @@ bool SMESHGUI_FilterDlg::createFilter (const int theType)
|
|||||||
aCriteria[ i ] = aCriterion;
|
aCriteria[ i ] = aCriterion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !myFilter[ theType ]->_is_nil() )
|
||||||
|
myFilter[ theType ]->UnRegister();
|
||||||
myFilter[ theType ] = aFilterMgr->CreateFilter();
|
myFilter[ theType ] = aFilterMgr->CreateFilter();
|
||||||
myFilter[ theType ]->SetCriteria(aCriteria.inout());
|
myFilter[ theType ]->SetCriteria(aCriteria.inout());
|
||||||
|
|
||||||
@ -3356,9 +3362,29 @@ SMESH::Filter_var SMESHGUI_FilterDlg::GetFilter() const
|
|||||||
|
|
||||||
void SMESHGUI_FilterDlg::SetFilter(SMESH::Filter_var filter, int type)
|
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;
|
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
|
// name : SMESHGUI_FilterDlg::insertFilterInViewer
|
||||||
// Purpose : Insert filter in viewer
|
// Purpose : Insert filter in viewer
|
||||||
|
@ -234,6 +234,7 @@ public:
|
|||||||
|
|
||||||
SMESH::Filter_var GetFilter() const;
|
SMESH::Filter_var GetFilter() const;
|
||||||
void SetFilter(SMESH::Filter_var filter, int type);
|
void SetFilter(SMESH::Filter_var filter, int type);
|
||||||
|
void UnRegisterFilters();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user