//=======================================================================
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();
insertFilterInViewer();
if (!myFilter[ aCurrType ]->GetPredicate()->_is_nil()) {
- //
+ //
bool toFilter = (( SMESH::FindActorByObject( myMesh )) ||
( myInitSourceWgOnApply && mySourceWg ) ||
( mySourceGrp->checkedId() == Dialog && mySourceWg ));
filterSource(aCurrType, aResultIds);
// select in viewer
selectInViewer(aCurrType, aResultIds);
+ // set ids to the dialog
+ if ( myInitSourceWgOnApply || mySourceGrp->checkedId() == Dialog )
+ setIdsToWg(mySourceWg, aResultIds);
}
}
if (aPred->IsSatisfy(*anIter))
theResIds.append(*anIter);
}
- // set ids to the dialog
- if (myInitSourceWgOnApply || aSourceId == Dialog)
- setIdsToWg(mySourceWg, theResIds);
}
//=======================================================================