From 74a4f1012d78e02c7eea47846e6516bf5b219a98 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 23 Jun 2011 12:36:03 +0000 Subject: [PATCH] 0021014: EDF 1583 SMESH: Improvement of the Python Dump for the creation of groups 1) make 'Mesh' be a default 'Source' 2) + SMESH::Filter_var GetFilter() const; + void SetFilter(SMESH::Filter_var filter, int type); --- src/SMESHGUI/SMESHGUI_FilterDlg.cxx | 34 +++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx index f4d4dd12e..88a03d58a 100755 --- a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx @@ -2525,7 +2525,7 @@ QWidget* SMESHGUI_FilterDlg::createSourceGroup (QWidget* theParent) mySourceGrp->addButton(aSelBtn, Selection); mySourceGrp->addButton(aDlgBtn, Dialog); - aSelBtn->setChecked(true); + aMeshBtn->setChecked(true); return aBox; } @@ -2664,7 +2664,7 @@ void SMESHGUI_FilterDlg::Init (const QList& theTypes) mySourceGrp->button(myApplyToState.contains(theTypes.first()) ? myApplyToState[ theTypes.first() ] : - Selection)->setChecked(true); + Mesh)->setChecked(true); } //======================================================================= @@ -3084,6 +3084,36 @@ bool SMESHGUI_FilterDlg::createFilter (const int theType) return true; } +//================================================================================ +/*! + * \brief Return the current filter + */ +//================================================================================ + +SMESH::Filter_var SMESHGUI_FilterDlg::GetFilter() const +{ + SMESH::Filter_var filter; + try { + int aCurrType = myTable->GetType(); + filter = myFilter[ aCurrType ]; + } + catch(...) + { + } + return filter._retn(); +} + +//================================================================================ +/*! + * \brief Sets a filter to the table + */ +//================================================================================ + +void SMESHGUI_FilterDlg::SetFilter(SMESH::Filter_var filter, int type) +{ + myFilter[ type ] = filter; +} + //======================================================================= // name : SMESHGUI_FilterDlg::insertFilterInViewer // Purpose : Insert filter in viewer -- 2.39.2