X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_CreateDualMeshOp.cxx;h=449f0a58233eef7bf6b41a815c084acd4c45bd99;hp=25f811700069ad11c3332ceeaeabdedd7034a5aa;hb=08485b06fa309a40c3769a9113c2b88dd26e103d;hpb=246a01ab716909058ec8255c089999a6e2a5d99f diff --git a/src/SMESHGUI/SMESHGUI_CreateDualMeshOp.cxx b/src/SMESHGUI/SMESHGUI_CreateDualMeshOp.cxx index 25f811700..449f0a582 100644 --- a/src/SMESHGUI/SMESHGUI_CreateDualMeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_CreateDualMeshOp.cxx @@ -40,8 +40,12 @@ #include #include #include +#include #include +// Qt includes +#include + // IDL includes #include #include CORBA_SERVER_HEADER(SMESH_MeshEditor) @@ -150,6 +154,9 @@ void SMESHGUI_CreateDualMeshOp::selectionDone() myDlg->ShowWarning( true ); } } + std::string mesh_name = "dual_" + pObj->GetName(); + myDlg->myMeshName->setText(QString(mesh_name.c_str())); + } catch ( const SALOME::SALOME_Exception& S_ex ) { @@ -158,6 +165,7 @@ void SMESHGUI_CreateDualMeshOp::selectionDone() catch ( ... ) { } + } //================================================================================ @@ -217,11 +225,9 @@ bool SMESHGUI_CreateDualMeshOp::onApply() bool aResult = false; SMESH::SMESH_Gen_var gen = SMESHGUI::GetSMESHGen(); SMESH::SMESH_Mesh_var newMesh; - QByteArray newMeshName="MESH_DUAL"; + QByteArray newMeshName=myDlg->myMeshName->text().toUtf8(); try { - // TODO: Call the python script using medcoupling - // String to run medcoupling dual // TODO: change name as previous name + "_dual" newMesh = gen->CreateDualMesh(mesh, newMeshName.constData()); @@ -246,10 +252,11 @@ bool SMESHGUI_CreateDualMeshOp::onApply() if( aResult ) { SMESHGUI::Modified(); - update( UF_ObjBrowser | UF_Model | UF_Viewer ); selectionDone(); - } + update( UF_ObjBrowser | UF_Model | UF_Viewer ); + } + SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser(); // updateObjBrowser(true); // SMESHGUI::Modified();