//=======================================================================
void SMESHGUI_FilterDlg::Init (const QList<int>& theTypes, const bool setInViewer)
{
+ if ( theTypes.empty() )
+ {
+ Init( SMESH::ALL, setInViewer );
+ return;
+ }
mySourceWg = 0;
myTypes = theTypes;
myMesh = SMESH::SMESH_Mesh::_nil();
if (aPred->IsSatisfy(*anIter))
theResIds.append(*anIter);
}
- // set ids to the dialog
- if (myInitSourceWgOnApply || aSourceId == Dialog)
- setIdsToWg(mySourceWg, theResIds);
}
//=======================================================================
// insert previously stored filter in viewer if necessary
if (!aFilter.IsNull())
SMESH::SetFilter(aFilter);
+
+ // set ids to the dialog
+ if (myInitSourceWgOnApply || mySourceGrp->checkedId() == Dialog)
+ setIdsToWg(mySourceWg, theIds);
}
//=======================================================================