Salome HOME
0019970: create groups automatically
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_XmlHandler.cxx
index 3bc04fdfaa38233e985d39b3c6b6658fed4abf1b..c5c45afbc7f891fdc0b2cd21f4cc55054fea31be 100644 (file)
@@ -122,11 +122,14 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
       QString aLabel = atts.value("label-id");
       QString anIcon = atts.value("icon-id");
       bool isAux = atts.value("auxiliary") == "true";
-      bool isNeedGeom = true;
+      bool isNeedGeom = true, isSupportSubmeshes = false;
       QString aNeedGeom = atts.value("need-geom");
       if ( !aNeedGeom.isEmpty() )
         isNeedGeom = (aNeedGeom == "true");
-      
+      QString suppSub = atts.value("support-submeshes");
+      if ( !suppSub.isEmpty() )
+        isSupportSubmeshes = (suppSub == "true");
+
       QString aDimStr = atts.value("dim");
       aDimStr = aDimStr.remove( ' ' );
       QStringList aDimList = aDimStr.split( ',', QString::SkipEmptyParts );
@@ -155,15 +158,16 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
       HypothesisData* aHypData =
         new HypothesisData (aHypAlType, myPluginName, myServerLib, myClientLib,
                             aLabel, anIcon, aDim, isAux,
-                            attr[ HYPOS ], attr[ OPT_HYPOS ], attr[ INPUT ], attr[ OUTPUT ], isNeedGeom );
+                            attr[ HYPOS ], attr[ OPT_HYPOS ], attr[ INPUT ], attr[ OUTPUT ],
+                            isNeedGeom, isSupportSubmeshes );
 
       if (qName == "algorithm")
       {
-        myAlgorithmsMap[aHypAlType.toLatin1().data()] = aHypData;
+        myAlgorithmsMap[aHypAlType] = aHypData;
       }
       else
       {
-        myHypothesesMap[aHypAlType.toLatin1().data()] = aHypData;
+        myHypothesesMap[aHypAlType] = aHypData;
       }
     }
   }
@@ -175,7 +179,7 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
     if (atts.value("name") != "")
     {
       HypothesesSet* aHypoSet = new HypothesesSet ( atts.value("name") );
-      myListOfHypothesesSets.push_back( aHypoSet );
+      myListOfHypothesesSets.append( aHypoSet );
 
       for ( int isHypo = 0; isHypo < 2; ++isHypo )
       {