diff --git a/cocos/editor-support/cocostudio/WidgetReader/NodeReader/NodeReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/NodeReader/NodeReader.cpp index 060c9c9ceb..da9be82bdc 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/NodeReader/NodeReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/NodeReader/NodeReader.cpp @@ -247,11 +247,7 @@ namespace cocostudio while (child) { std::string attriname = child->Name(); - if (attriname == "Children") - { - break; - } - else if (attriname == "Position") + if (attriname == "Position") { attribute = child->FirstAttribute(); diff --git a/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp index 6b868635f7..4446dc1e5f 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp @@ -558,11 +558,7 @@ namespace cocostudio while (child) { std::string attriname = child->Name(); - if (attriname == "Children") - { - break; - } - else if (attriname == "Position") + if (attriname == "Position") { attribute = child->FirstAttribute();