X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_TranslationDlg.cxx;h=ccb5eae4da52392fae43e0cc1d538d6fc49e2b4a;hb=790c5cfa903e3b809e6bd5b7aefed48d17f15dc5;hp=5ec665216fa77d72d67e38cbe97dcf641e5abd7f;hpb=a02de3dacca4bc2a799c16bf257111565e8b1b9f;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx index 5ec665216..ccb5eae4d 100644 --- a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx @@ -504,6 +504,7 @@ bool SMESHGUI_TranslationDlg::ClickOnApply() int actionButton = ActionGroup->checkedId(); bool makeGroups = ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ); + QStringList anEntryList; try { SUIT_OverrideCursor aWaitCursor; SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor(); @@ -543,6 +544,8 @@ bool SMESHGUI_TranslationDlg::ClickOnApply() LineEditNewMesh->text().toLatin1().data()); if (!mesh->_is_nil()) { mesh->SetParameters(aParameters.join(":").toLatin1().constData()); + if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) ) + anEntryList.append( aSObject->GetID().c_str() ); #ifdef WITHGENERICOBJ // obj has been published in study. Its refcount has been incremented. // It is safe to decrement its refcount @@ -555,9 +558,14 @@ bool SMESHGUI_TranslationDlg::ClickOnApply() } SMESH::UpdateView(); - if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() || - actionButton == MAKE_MESH_BUTTON ) + if ( ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) || + actionButton == MAKE_MESH_BUTTON ) { mySMESHGUI->updateObjBrowser(true); // new groups may appear + if( LightApp_Application* anApp = + dynamic_cast( SUIT_Session::session()->activeApplication() ) ) + anApp->browseObjects( anEntryList, isApplyAndClose() ); + } + Init(false); ConstructorsClicked(GetConstructorId()); mySelectedObject = SMESH::SMESH_IDSource::_nil(); @@ -575,6 +583,7 @@ bool SMESHGUI_TranslationDlg::ClickOnApply() //================================================================================= void SMESHGUI_TranslationDlg::ClickOnOk() { + setIsApplyAndClose( true ); if( ClickOnApply() ) ClickOnCancel(); } @@ -1005,6 +1014,7 @@ void SMESHGUI_TranslationDlg::onActionClicked(int button) break; } setNewMeshName(); + toDisplaySimulation(); } //======================================================================= @@ -1132,7 +1142,8 @@ void SMESHGUI_TranslationDlg::onDisplaySimulation( bool toDisplayPreview ) { } try { - bool copy = ActionGroup->checkedId() == COPY_ELEMS_BUTTON; + bool copy = ( ActionGroup->checkedId() == COPY_ELEMS_BUTTON || + ActionGroup->checkedId() == MAKE_MESH_BUTTON ); SUIT_OverrideCursor aWaitCursor; SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer(); if(CheckBoxMesh->isChecked())