const QList<int>& theTypes )
: QDialog( SMESH::GetDesktop( theModule ) ),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
+ myInitSourceWgOnApply( true )
{
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
mySelector = aViewWindow->GetSelector();
const int theType )
: QDialog( SMESH::GetDesktop( theModule ) ),
mySMESHGUI( theModule ),
- mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
+ mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
+ myInitSourceWgOnApply( true )
{
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
mySelector = aViewWindow->GetSelector();
// Purpose : Set widget of parent dialog containing idsto be filtered if
// user select corresponding source radio button
//=======================================================================
-void SMESHGUI_FilterDlg::SetSourceWg (QWidget* theWg)
+void SMESHGUI_FilterDlg::SetSourceWg (QWidget* theWg,
+ const bool initOnApply)
{
mySourceWg = theWg;
+ myInitSourceWgOnApply = initOnApply;
}
//=======================================================================
if (mySelectionMgr) {
myIObjects.Clear();
- const SALOME_ListIO& anObjs = mySelector->StoredIObjects();
+ const SALOME_ListIO& anObjs = mySelector->StoredIObjects();
SALOME_ListIteratorOfListIO anIter (anObjs);
for ( ; anIter.More(); anIter.Next()) {
TColStd_IndexedMapOfInteger aMap;
if (!myFilter[ aCurrType ]->GetPredicate()->_is_nil()) {
QList<int> aResultIds;
filterSource(aCurrType, aResultIds);
+ // select in viewer
selectInViewer(aCurrType, aResultIds);
}
+
myInsertState[ aCurrType ] = mySetInViewer->isChecked();
myApplyToState[ aCurrType ] = mySourceGrp->checkedId();
}
for (anIter = aDialogIds.begin(); anIter != aDialogIds.end(); ++ anIter)
if (aPred->IsSatisfy(*anIter))
theResIds.append(*anIter);
-
- // set ids to the dialog
- setIdsToWg(mySourceWg, theResIds);
}
+ // set ids to the dialog
+ if (myInitSourceWgOnApply || aSourceId == Dialog)
+ setIdsToWg(mySourceWg, theResIds);
}
//=======================================================================