From 4002febb8b27c5d1bb1817183d1f046096ecb8f6 Mon Sep 17 00:00:00 2001 From: azakir Date: Tue, 19 Jan 2021 10:30:07 +0100 Subject: [PATCH] enable to publish in TUI --- src/SMESH/MG_ADAPT.cxx | 2 +- src/SMESHGUI/SMESHGUI_MG_ADAPTDRIVER.cxx | 3 --- src/SMESH_I/MG_ADAPT_i.cxx | 6 ++++++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/SMESH/MG_ADAPT.cxx b/src/SMESH/MG_ADAPT.cxx index c3cba43ac..09a06ef86 100644 --- a/src/SMESH/MG_ADAPT.cxx +++ b/src/SMESH/MG_ADAPT.cxx @@ -1253,7 +1253,7 @@ void MgAdapt::restorefams(MEDCoupling::MEDFileMesh* fileMesh) const for (; fIt!=famVec.end(); ++fIt) { - try // safety : FAMILY could be lost P2-->P1 + try // { std::string givenFamNameFromMeshGemConverter = fileMesh->getFamilyNameGivenId( std::abs(fIt->_famId) ); fileMesh->changeFamilyId(std::abs(fIt->_famId), fIt->_famId); diff --git a/src/SMESHGUI/SMESHGUI_MG_ADAPTDRIVER.cxx b/src/SMESHGUI/SMESHGUI_MG_ADAPTDRIVER.cxx index 0025f5751..85a719b40 100644 --- a/src/SMESHGUI/SMESHGUI_MG_ADAPTDRIVER.cxx +++ b/src/SMESHGUI/SMESHGUI_MG_ADAPTDRIVER.cxx @@ -360,9 +360,6 @@ bool SMESHGUI_MG_ADAPTDRIVER::clickOnApply() SMESHGUI_MgAdaptDlg::clickOnApply(); bool ok = execute(); - //~SMESHGUI_MG_AdaptComputeDlg_QThread atest(getModel()); - //~atest.start(); - //~atest.quit(); if (getModel()->getPublish()) this->createMeshInObjectBrowser(); return ok; diff --git a/src/SMESH_I/MG_ADAPT_i.cxx b/src/SMESH_I/MG_ADAPT_i.cxx index 04ff3daaa..51160b1df 100644 --- a/src/SMESH_I/MG_ADAPT_i.cxx +++ b/src/SMESH_I/MG_ADAPT_i.cxx @@ -405,6 +405,12 @@ CORBA::Long MG_ADAPT_i::compute() std::cerr<getPublish()) + { + SMESH_Gen_i* smeshGen_i = SMESH_Gen_i::GetSMESHGen(); + SMESH::DriverMED_ReadStatus theStatus; + smeshGen_i->CreateMeshesFromMED(myMgAdapt->getMedFileOut().c_str(), theStatus); + } //~errStr = err.c_str(); return ret; } -- 2.39.2