Salome HOME
COTECH: Update names of DISTENE products
authoreap <eap@opencascade.com>
Tue, 9 Sep 2014 10:19:51 +0000 (14:19 +0400)
committereap <eap@opencascade.com>
Tue, 9 Sep 2014 10:19:51 +0000 (14:19 +0400)
BLSURF -> MG-CADSurf
GHS3D -> MG-Tetra
Hexotic -> MG-Hexa

and

GHS3DPRL -> MG-Tetra Parallel

src/SMESHGUI/SMESHGUI_XmlHandler.cxx
src/SMESH_I/SMESH_Gen_i.cxx

index b5c53d4b56d516d504ce42e5cc76efb463e07324..db420a5650d0168df958ec770d345bfc61fac9b6 100644 (file)
@@ -161,7 +161,7 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
       for ( int i = 0; i < NB_ATTRIBUTES; ++i ) {
         QString aStr = atts.value( name[i] );
         if ( !aStr.isEmpty() ) {
-          aStr.remove( ' ' );
+          aStr = aStr.trimmed();
           attr[ i ] = aStr.split( ',', QString::SkipEmptyParts );
         }
       }
index b822651b7ee853da1a91cc152f911fc9fba7eb3a..cffb3d57308c54b7f11da79d15613033b745c64f 100644 (file)
@@ -467,23 +467,22 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
   SMESH_Hypothesis_i* myHypothesis_i = 0;
   SMESH::SMESH_Hypothesis_var hypothesis_i;
   std::string aPlatformLibName;
-  typedef GenericHypothesisCreator_i* (*GetHypothesisCreator)(const char* );
-  GenericHypothesisCreator_i* aCreator = getHypothesisCreator(theHypName, theLibName, aPlatformLibName);
-  // create a new hypothesis object, store its ref. in studyContext
-  if(MYDEBUG) MESSAGE("Create Hypothesis " << theHypName);
-  myHypothesis_i =
-    myHypCreatorMap[string(theHypName)]->Create(myPoa, GetCurrentStudyID(), &myGen);
-  myHypothesis_i->SetLibName(aPlatformLibName.c_str()); // for persistency assurance
-
-  if (!myHypothesis_i)
-    return hypothesis_i._retn();
+  GenericHypothesisCreator_i* aCreator =
+    getHypothesisCreator(theHypName, theLibName, aPlatformLibName);
 
-  // activate the CORBA servant of hypothesis
-  hypothesis_i = myHypothesis_i->_this();
-  int nextId = RegisterObject( hypothesis_i );
-  if(MYDEBUG) { MESSAGE( "Add hypo to map with id = "<< nextId ); }
-  else        { nextId = 0; } // avoid "unused variable" warning in release mode
+  // create a new hypothesis object, store its ref. in studyContext
+  myHypothesis_i = aCreator->Create(myPoa, GetCurrentStudyID(), &myGen);
+  if (myHypothesis_i)
+  {
+    myHypothesis_i->SetLibName(aPlatformLibName.c_str()); // for persistency assurance
+    myHypCreatorMap[ myHypothesis_i->GetName() ] = aCreator;
 
+    // activate the CORBA servant of hypothesis
+    hypothesis_i = myHypothesis_i->_this();
+    int nextId = RegisterObject( hypothesis_i );
+    if(MYDEBUG) { MESSAGE( "Add hypo to map with id = "<< nextId ); }
+    else        { nextId = 0; } // avoid "unused variable" warning in release mode
+  }
   return hypothesis_i._retn();
 }