X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_HypothesesUtils.cxx;h=7aff8c6ce1b4b281c333e3d19cadf152d9832d07;hp=def3ff5572faf09584510e225003f46769ff9aa5;hb=c5f8cda9bf008812f728073dd5cc04f6c5082bbb;hpb=204a3246f4d94d4375bdac7391bec2b3ab49e0d9 diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index def3ff557..7aff8c6ce 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -521,7 +521,17 @@ namespace SMESH try { // load plugin library if(MYDEBUG) MESSAGE("Loading client meshers plugin library ..."); - LibHandle libHandle = LoadLib( aClientLibName.toLatin1().data() ); +#ifdef WIN32 +#ifdef UNICODE + LPTSTR path = new TCHAR[aClientLibName.length() + 1]; + path[aClientLibName.toWCharArray(path)] = '\0'; +#else + const char* path = aClientLibName.toUtf8().data(); +#endif +#else + char* path = aClientLibName.toUtf8().data(); +#endif + LibHandle libHandle = LoadLib( path ); if (!libHandle) { // report any error, if occurred { @@ -585,7 +595,7 @@ namespace SMESH try { SMESH::SMESH_Hypothesis_var aHypothesis; aHypothesis = SMESHGUI::GetSMESHGen()->CreateHypothesis(aHypType.toLatin1().data(), - aServLib.toLatin1().data()); + aServLib.toUtf8().data()); if (!aHypothesis->_is_nil()) { _PTR(SObject) aHypSObject = SMESH::FindSObject(aHypothesis.in()); if (aHypSObject) { @@ -613,7 +623,7 @@ namespace SMESH HypothesisData* aHypData = GetHypothesisData(aHypType); QString aServLib = aHypData->ServerLibName; return SMESHGUI::GetSMESHGen()->IsApplicable( aHypType.toLatin1().data(), - aServLib.toLatin1().data(), + aServLib.toUtf8().data(), theGeomObject, toCheckAll); } @@ -631,12 +641,6 @@ namespace SMESH try { CORBA::String_var error; res = aMesh->AddHypothesis(aShapeObject, aHyp, error.out()); - if (res < SMESH::HYP_UNKNOWN_FATAL) { - _PTR(SObject) aSH = SMESH::FindSObject(aHyp); - if (SM && aSH) { - SMESH::ModifiedMesh(SM, false, aMesh->NbNodes()==0); - } - } if (res > SMESH::HYP_OK) { wc.suspend(); processHypothesisStatus(res, aHyp, true, error.in() ); @@ -668,11 +672,6 @@ namespace SMESH { CORBA::String_var error; res = aMesh->AddHypothesis( aShapeObject, aHyp, error.out() ); - if (res < SMESH::HYP_UNKNOWN_FATAL) { - _PTR(SObject) meshSO = SMESH::FindSObject(aMesh); - if (meshSO) - SMESH::ModifiedMesh(meshSO, false, aMesh->NbNodes()==0); - } if (res > SMESH::HYP_OK) { wc.suspend(); processHypothesisStatus( res, aHyp, true, error.in() ); @@ -705,7 +704,7 @@ namespace SMESH SUIT_OverrideCursor wc; try { - _PTR(Study) aStudy = GetActiveStudyDocument(); + _PTR(Study) aStudy = getStudy(); _PTR(SObject) aHypObj = aStudy->FindObjectID( IObject->getEntry() ); if( aHypObj ) { @@ -763,9 +762,6 @@ namespace SMESH } if ( _PTR(SObject) meshSO = SMESH::FindSObject(aMesh) ) { - if ( res < SMESH::HYP_UNKNOWN_FATAL ) - SMESH::ModifiedMesh(meshSO, false, aMesh->NbNodes()==0); - if ( SMESH_Actor* actor = SMESH::FindActorByEntry( meshSO->GetID().c_str() )) if( actor->GetVisibility() ) actor->Update(); @@ -789,8 +785,7 @@ namespace SMESH if (!AlgoOrHyp->_is_nil()) { _PTR(SObject) SO_Hypothesis = SMESH::FindSObject(AlgoOrHyp); if (SO_Hypothesis) { - SObjectList listSO = - SMESHGUI::activeStudy()->studyDS()->FindDependances(SO_Hypothesis); + SObjectList listSO = SMESH::getStudy()->FindDependances(SO_Hypothesis); if(MYDEBUG) MESSAGE("SMESHGUI::GetMeshesUsingAlgoOrHypothesis(): dependency number ="<