]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the "case" attributes registration for the radio buttons. Make unit-tests...
authormpv <mikhail.ponikarov@opencascade.com>
Wed, 27 Jun 2018 14:16:43 +0000 (17:16 +0300)
committermpv <mikhail.ponikarov@opencascade.com>
Wed, 27 Jun 2018 14:16:43 +0000 (17:16 +0300)
src/Config/Config_Common.cpp
src/Config/Config_FeatureReader.cpp
src/SketchPlugin/CMakeLists.txt

index 544e7a7ea4c41b925c8207ac0217aebb0ab6f5af..c83a33079f7df2bae5bbb7ee56fa48609e9e2e28 100644 (file)
@@ -68,7 +68,8 @@ bool isAttributeNode(xmlNodePtr theNode)
   // it's parent is "feature" or "source" or page ("case" or "box")
   if(!hasParent(theNode, NODE_FEATURE, NODE_SOURCE,
                          WDG_GROUP, WDG_OPTIONALBOX,
-                         WDG_TOOLBOX_BOX, WDG_SWITCH_CASE, NULL))
+                         WDG_TOOLBOX_BOX, WDG_RADIOBOX_ITEM,
+                         WDG_SWITCH_CASE, NULL))
     return false;
 
   //it should not be a "source" or a "validator" node
@@ -86,7 +87,7 @@ bool isWidgetNode(xmlNodePtr theNode)
     return false;
   // it's parent is "feature" or "source" or a page ("box", "case")
   if(!hasParent(theNode, NODE_FEATURE, NODE_SOURCE, WDG_GROUP, WDG_OPTIONALBOX,
-                         WDG_TOOLBOX_BOX, WDG_SWITCH_CASE, NULL))
+    WDG_TOOLBOX_BOX, WDG_RADIOBOX_ITEM, WDG_SWITCH_CASE, NULL))
     return false;
 
   //it should not be a "source" or a "validator" node
@@ -99,7 +100,8 @@ bool isCaseNode(xmlNodePtr theNode)
   if(!isElementNode(theNode))
     return false;
 
-  return isNode(theNode, WDG_OPTIONALBOX, WDG_SWITCH_CASE, WDG_TOOLBOX_BOX, NULL);
+  return isNode(theNode, WDG_OPTIONALBOX, WDG_SWITCH_CASE, WDG_TOOLBOX_BOX,
+    WDG_RADIOBOX_ITEM, NULL);
 }
 
 bool hasChild(xmlNodePtr theNode)
index ffb5bc372731df987a2853961d47152e958d8d92..1bc35c4e98a965d633bc244db76e52557f65394b 100644 (file)
@@ -91,7 +91,7 @@ void Config_FeatureReader::processNode(xmlNodePtr theNode)
 
         std::list<std::pair<std::string, std::string> > aCases;
         xmlNodePtr aCaseNode =
-          hasParentRecursive(theNode, WDG_SWITCH_CASE, WDG_TOOLBOX_BOX, WDG_OPTIONALBOX, NULL);
+          hasParentRecursive(theNode, WDG_SWITCH_CASE, WDG_TOOLBOX_BOX, WDG_OPTIONALBOX, WDG_RADIOBOX_ITEM, NULL);
         while(aCaseNode) {
           std::string aCaseNodeID = getProperty(aCaseNode, _ID);
           std::string aSwitchNodeID = "";
@@ -116,7 +116,7 @@ void Config_FeatureReader::processNode(xmlNodePtr theNode)
 
           aCases.push_back(std::make_pair(aSwitchNodeID, aCaseNodeID));
           aCaseNode = hasParentRecursive(aSwitchNode, WDG_SWITCH_CASE,
-                                         WDG_TOOLBOX_BOX, WDG_OPTIONALBOX, NULL);
+            WDG_TOOLBOX_BOX, WDG_OPTIONALBOX, WDG_RADIOBOX_ITEM, NULL);
         }
         aMessage->setCases(aCases);
         Events_Loop::loop()->send(aMessage);
@@ -135,7 +135,7 @@ void Config_FeatureReader::processNode(xmlNodePtr theNode)
 void Config_FeatureReader::cleanup(xmlNodePtr theNode)
 {
   if (isNode(theNode, WDG_OPTIONALBOX, WDG_SWITCH, WDG_SWITCH_CASE,
-             WDG_TOOLBOX, WDG_TOOLBOX_BOX, NULL)) {
+    WDG_TOOLBOX, WDG_TOOLBOX_BOX, WDG_RADIOBOX_ITEM, WDG_RADIOBOX, NULL)) {
     // cleanup id of cases when leave case node
     cleanupAttribute(theNode, _ID);
   }
index 47550e2d55bd8d24b1f500f0b1fc2b6c4686f883..412c196051d6d0787b5aa69e3e60a0a51246656a 100644 (file)
@@ -235,7 +235,7 @@ ADD_UNIT_TESTS(TestSketchPointLine.py
                TestIntersectionWithLine.py
                TestIntersectionWithCircle.py
                TestIntersectionWithSpline.py
-               TestIntersectionChangeType.py
+               TestIntersectionChangeEdge.py
                Test2273.py
                Test2280.py
                Test2287.py