]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/Config/Config_Common.cpp
Salome HOME
Issue #1659 New widget for supporting optional inputs : correction for enclosed cases.
[modules/shaper.git] / src / Config / Config_Common.cpp
index 7d2a3ba874e08e43ea979d924ece85027e53f225..ac274ada8ef73524c07911d8ca5f976664e4dc64 100644 (file)
@@ -143,24 +143,24 @@ bool hasParent(xmlNodePtr theNode, const char* theNodeName, ...)
   return false;\r
 }\r
 \r
-bool hasParentRecursive(xmlNodePtr theNode, const std::vector<const char*>& theNodeNames)\r
+xmlNodePtr hasParentRecursive(xmlNodePtr theNode, const std::vector<const char*>& theNodeNames)\r
 {\r
   if (!hasParent(theNode)) {\r
-    return false; // have no parents at all\r
+    return 0; // have no parents at all\r
   }\r
   xmlNodePtr aNode = theNode->parent;\r
   const xmlChar* aName = aNode->name;\r
   if (!aName || !isElementNode(aNode)) {\r
-    return false;\r
+    return 0;\r
   }\r
   for (size_t anIndex = 0; anIndex < theNodeNames.size(); ++anIndex) {\r
     if (!xmlStrcmp(aName, (const xmlChar *) theNodeNames[anIndex]))\r
-      return true;\r
+      return aNode;\r
   }\r
   return hasParentRecursive(aNode, theNodeNames);\r
 }\r
 \r
-bool hasParentRecursive(xmlNodePtr theNode, const char* theNodeName, ...)\r
+xmlNodePtr hasParentRecursive(xmlNodePtr theNode, const char* theNodeName, ...)\r
 {\r
   std::vector<const char*> aNodeNames;\r
   va_list args;  // define argument list variable\r