diff --git a/cocos/editor-support/cocostudio/CCSGUIReader.cpp b/cocos/editor-support/cocostudio/CCSGUIReader.cpp index 639253409c..37f6605f48 100644 --- a/cocos/editor-support/cocostudio/CCSGUIReader.cpp +++ b/cocos/editor-support/cocostudio/CCSGUIReader.cpp @@ -260,14 +260,6 @@ std::string WidgetPropertiesReader::getWidgetReaderClassName(Widget* widget) { readerName = "TextFieldReader"; } - else if (dynamic_cast(widget)) - { - readerName = "LayoutReader"; - } - else if (dynamic_cast(widget)) - { - readerName = "ScrollViewReader"; - } else if (dynamic_cast(widget)) { readerName = "ListViewReader"; @@ -276,6 +268,15 @@ std::string WidgetPropertiesReader::getWidgetReaderClassName(Widget* widget) { readerName = "PageViewReader"; } + else if (dynamic_cast(widget)) + { + readerName = "ScrollViewReader"; + } + + else if (dynamic_cast(widget)) + { + readerName = "LayoutReader"; + } else if (dynamic_cast(widget)) { readerName = "WidgetReader"; diff --git a/cocos/ui/UIText.cpp b/cocos/ui/UIText.cpp index d8be8244ac..e0d0f1ae38 100644 --- a/cocos/ui/UIText.cpp +++ b/cocos/ui/UIText.cpp @@ -354,7 +354,7 @@ void Text::copySpecialProperties(Widget *widget) if (label) { setFontName(label->_fontName); - setFontSize(label->_labelRenderer->getSystemFontSize()); + setFontSize(label->getFontSize()); setString(label->getString()); setTouchScaleChangeEnabled(label->_touchScaleChangeEnabled); setTextHorizontalAlignment(label->_labelRenderer->getHorizontalAlignment());