Salome HOME
0021711: [CEA 579] Simplify Properties dialog accordingly to dimension of mesh
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_HypothesesUtils.cxx
index a0986ce5d21bc78c2f5d1d190ac0a5504df09dd1..fde2ae60951f9965bf5af25aecd8ef3f8698d3a5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  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
@@ -282,6 +282,7 @@ namespace SMESH
     THypothesisDataMap::ConstIterator anIter;
     for ( anIter = pMap.begin(); anIter != pMap.end(); anIter++ ) {
       HypothesisData* aData = anIter.value();
+      if(!aData || aData->Label.isEmpty()) continue;
       if ( ( theDim < 0 || aData->Dim.contains( theDim ) ) && aData->IsAux == isAux) {
         if (checkGeometry) {
           if (aData->IsNeedGeometry == isNeedGeometry)
@@ -450,6 +451,12 @@ namespace SMESH
               // map hypothesis creator to a hypothesis name
               // BUG 0020378
               //myHypCreatorMap[aHypType] = aCreator;
+
+              //rnv : This dynamic property of the QObject stores the name of the plugin.
+              //      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);
             }
           }
         }