X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MergeDlg.cxx;h=63d4b9d306308f296bbd0193adcf28e6f1f66307;hb=d90a581cefcc55423f12edd390bd91118a4a6b0c;hp=f76bab499ae38ab2ba82631cc4aee63fc3a226e1;hpb=64680c27c16f878decc136ec6c38dc9a72f12f3b;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx index f76bab499..63d4b9d30 100644 --- a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -1144,6 +1144,9 @@ void SMESHGUI_MergeDlg::SetEditCurrentArgument() //================================================================================= void SMESHGUI_MergeDlg::SelectionIntoArgument() { + if ( myIsBusy ) + return; + if (myEditCurrentArgument == (QWidget*)LineEditMesh) { QString aString = ""; @@ -1222,6 +1225,9 @@ void SMESHGUI_MergeDlg::SelectionIntoArgument() LineEditMesh->setText( aString ); + + myIsBusy = true; // here selection can change + if (myAction == MERGE_NODES) { SMESH::SetPointRepresentation(true); if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) @@ -1231,8 +1237,11 @@ void SMESHGUI_MergeDlg::SelectionIntoArgument() if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->SetSelectionMode(CellSelection); + myIsBusy = false; + // process groups myGroups.clear(); + ListExclude->clear(); if ( isMeshSelected ) { SMESH::ListOfGroups_var aListOfGroups = myMesh->GetGroups(); @@ -1407,9 +1416,11 @@ void SMESHGUI_MergeDlg::onTypeChanged (int id) myIdPreview->SetPointsLabeled(false); SMESH::SetPointRepresentation(false); + myIsBusy = true; // keep currently selected mesh if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->SetSelectionMode(ActorSelection); mySelectionMgr->clearFilters(); + myIsBusy = false; GroupCoincident->hide(); GroupEdit->hide(); @@ -1423,6 +1434,7 @@ void SMESHGUI_MergeDlg::onTypeChanged (int id) myMeshOrSubMeshOrGroupFilter = new SMESH_TypeFilter (SMESH::IDSOURCE); + myIsBusy = true; // keep currently selected mesh if (myAction == MERGE_NODES) { SMESH::SetPointRepresentation(true); if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) @@ -1434,11 +1446,14 @@ void SMESHGUI_MergeDlg::onTypeChanged (int id) if( mySelector->IsSelectionEnabled() ) aViewWindow->SetSelectionMode(CellSelection); } + myIsBusy = false; GroupCoincident->show(); GroupEdit->show(); break; } - SelectionIntoArgument(); + + if ( myMesh->_is_nil() ) + SelectionIntoArgument(); updateControls(); @@ -1606,7 +1621,7 @@ void SMESHGUI_MergeDlg::onSelectKeep() // IDs to groups or vice versa //======================================================================= -void SMESHGUI_MergeDlg::onKeepSourceChanged(int isGroup) +void SMESHGUI_MergeDlg::onKeepSourceChanged(int /*isGroup*/) { KeepList->clear(); SelectKeepButton->click();