X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_HypothesesUtils.cxx;h=dce31dfb8b638b0256424f7a0f135ad173e84804;hp=836c2e3609f2fe2b0a8b0dc9c2f516a54216239f;hb=7eda9ca931ed2a11cb5e4637e4ffe19f5c061115;hpb=63a442b2c3cbc5e2155d83e86dfdb77d6961fab3 diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index 836c2e360..dce31dfb8 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -469,7 +469,7 @@ namespace SMESH // It is used to obtain plugin root dir environment variable // in the SMESHGUI_HypothesisDlg class. Plugin root dir environment // variable is used to display documentation. - aCreator->setProperty(PLUGIN_NAME,aHypData->PluginName); + aCreator->setProperty(SMESH::Plugin_Name(),aHypData->PluginName); } } } @@ -511,10 +511,14 @@ namespace SMESH return SMESH::SMESH_Hypothesis::_nil(); } + bool IsApplicable(const QString& aHypType, GEOM::GEOM_Object_ptr theGeomObject, const bool toCheckAll) { + if ( getenv("NO_LIMIT_ALGO_BY_SHAPE")) // allow a workaround for a case if + return true; // IsApplicable() returns false due to a bug + HypothesisData* aHypData = GetHypothesisData(aHypType); QString aServLib = aHypData->ServerLibName; return SMESHGUI::GetSMESHGen()->IsApplicable( aHypType.toLatin1().data(), @@ -625,7 +629,7 @@ namespace SMESH { SMESH_Hypothesis_var hypo = SMESH_Hypothesis::_narrow( SObjectToObject( aHypObj ) ); SObjectList meshList = GetMeshesUsingAlgoOrHypothesis( hypo ); - for( int i = 0; i < meshList.size(); i++ ) + for( size_t i = 0; i < meshList.size(); i++ ) RemoveHypothesisOrAlgorithmOnMesh( meshList[ i ], hypo ); } } @@ -725,7 +729,7 @@ namespace SMESH QString GetMessageOnAlgoStateErrors(const algo_error_array& errors) { QString resMsg; // PAL14861 = QObject::tr("SMESH_WRN_MISSING_PARAMETERS") + ":\n"; - for ( int i = 0; i < errors.length(); ++i ) { + for ( size_t i = 0; i < errors.length(); ++i ) { const SMESH::AlgoStateError & error = errors[ i ]; const bool hasAlgo = ( strlen( error.algoName ) != 0 ); QString msg;