enable to publish in TUI

This commit is contained in:
azakir 2021-01-19 10:30:07 +01:00
parent 238d8c9c1e
commit 4002febb8b
3 changed files with 7 additions and 4 deletions

View File

@ -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);

View File

@ -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;

View File

@ -405,6 +405,12 @@ CORBA::Long MG_ADAPT_i::compute()
std::cerr<<e.what();
ret = -1;
}
if(ret!=-1 && myMgAdapt->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;
}