Salome HOME
Issue #1764: The result of partition is not stored in a folder
[modules/shaper.git] / src / Model / Model_Session.cpp
index fe35df17d218e244740d6a3b28e6e43407b282e4..ce6a26f9a81268becaf85d3e3a04b3a209d14b06 100644 (file)
@@ -358,6 +358,7 @@ void Model_Session::processEvent(const std::shared_ptr<Events_Message>& theMessa
     const std::shared_ptr<Config_FeatureMessage> aMsg = 
       std::dynamic_pointer_cast<Config_FeatureMessage>(theMessage);
     if (aMsg) {
+
       // process the plugin info, load plugin
       if (myPlugins.find(aMsg->id()) == myPlugins.end()) {
         myPlugins[aMsg->id()] = std::pair<std::string, std::string>(
@@ -367,15 +368,16 @@ void Model_Session::processEvent(const std::shared_ptr<Events_Message>& theMessa
       const std::shared_ptr<Config_AttributeMessage> aMsgAttr = 
         std::dynamic_pointer_cast<Config_AttributeMessage>(theMessage);
       if (aMsgAttr) {
+
         if (!aMsgAttr->isObligatory()) {
           validators()->registerNotObligatory(aMsgAttr->featureId(), aMsgAttr->attributeId());
         }
         if(aMsgAttr->isConcealment()) {
           validators()->registerConcealment(aMsgAttr->featureId(), aMsgAttr->attributeId());
         }
-        if (!aMsgAttr->caseId().empty()) {
-          validators()->registerCase(aMsgAttr->featureId(), aMsgAttr->attributeId(),
-            aMsgAttr->switchId(), aMsgAttr->caseId());
+        const std::list<std::pair<std::string, std::string> >& aCases = aMsgAttr->getCases();
+        if (!aCases.empty()) {
+          validators()->registerCase(aMsgAttr->featureId(), aMsgAttr->attributeId(), aCases);
         }
       }
     }