mirror of https://github.com/axmolengine/axmol.git
fix studio json reader percentage mode bug
This commit is contained in:
parent
76eb095f32
commit
0c1ee8b26a
|
@ -1412,7 +1412,7 @@ Widget* WidgetPropertiesReader0300::widgetFromBinary(CocoLoader* cocoLoader, st
|
|||
}
|
||||
else
|
||||
{
|
||||
if (dynamic_cast<Layout*>(widget))
|
||||
if (nullptr == dynamic_cast<Layout*>(widget))
|
||||
{
|
||||
if (child->getPositionType() == ui::Widget::PositionType::PERCENT)
|
||||
{
|
||||
|
@ -1504,7 +1504,7 @@ Widget* WidgetPropertiesReader0300::widgetFromJsonDictionary(const rapidjson::Va
|
|||
}
|
||||
else
|
||||
{
|
||||
if (dynamic_cast<Layout*>(widget))
|
||||
if (nullptr == dynamic_cast<Layout*>(widget))
|
||||
{
|
||||
if (child->getPositionType() == ui::Widget::PositionType::PERCENT)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue