//=================================================================================
void SMESHGUI_MergeDlg::SelectionIntoArgument()
{
+ if ( myIsBusy )
+ return;
+
if (myEditCurrentArgument == (QWidget*)LineEditMesh)
{
QString aString = "";
LineEditMesh->setText( aString );
+
+ myIsBusy = true; // here selection can change
+
if (myAction == MERGE_NODES) {
SMESH::SetPointRepresentation(true);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(CellSelection);
+ myIsBusy = false;
+
// process groups
myGroups.clear();
ListExclude->clear();
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();
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 ))
if( mySelector->IsSelectionEnabled() )
aViewWindow->SetSelectionMode(CellSelection);
}
+ myIsBusy = false;
GroupCoincident->show();
GroupEdit->show();
break;
}
- SelectionIntoArgument();
+
+ if ( myMesh->_is_nil() )
+ SelectionIntoArgument();
updateControls();
lines.push_back( aSMESHGen + " = smeshBuilder.New()" );
if ( isPublished )
- optionalComment = helper + "#";
+ optionalComment = "#";
lines.push_back( optionalComment + aSMESHGen + ".SetEnablePublish( False ) # Set to False to avoid publish in study if not needed or in some particular situations:" );
- lines.push_back( " # multiples meshes built in parallel, complex and numerous mesh edition (performance)" );
+ lines.push_back( " # multiples meshes built in parallel, complex and numerous mesh edition (performance)\n" );
lines.push_back( helper + "aFilterManager = " + aSMESHGen + ".CreateFilterManager()" );
lines.push_back( helper + "aMeasurements = " + aSMESHGen + ".CreateMeasurements()" );