From 0c1ee8b26a996f605b8f414c2c6a374cf8021909 Mon Sep 17 00:00:00 2001 From: andyque Date: Thu, 25 Jun 2015 16:14:22 +0800 Subject: [PATCH] fix studio json reader percentage mode bug --- cocos/editor-support/cocostudio/CCSGUIReader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/editor-support/cocostudio/CCSGUIReader.cpp b/cocos/editor-support/cocostudio/CCSGUIReader.cpp index 5cda9f553d..34cc2ee17a 100644 --- a/cocos/editor-support/cocostudio/CCSGUIReader.cpp +++ b/cocos/editor-support/cocostudio/CCSGUIReader.cpp @@ -1412,7 +1412,7 @@ Widget* WidgetPropertiesReader0300::widgetFromBinary(CocoLoader* cocoLoader, st } else { - if (dynamic_cast(widget)) + if (nullptr == dynamic_cast(widget)) { if (child->getPositionType() == ui::Widget::PositionType::PERCENT) { @@ -1504,7 +1504,7 @@ Widget* WidgetPropertiesReader0300::widgetFromJsonDictionary(const rapidjson::Va } else { - if (dynamic_cast(widget)) + if (nullptr == dynamic_cast(widget)) { if (child->getPositionType() == ui::Widget::PositionType::PERCENT) {