From 7d2685ba020055c1f54019ee46bffce18f405aef Mon Sep 17 00:00:00 2001 From: andyque Date: Tue, 1 Jul 2014 21:02:37 +0800 Subject: [PATCH] fix content Size --- cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp b/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp index 1864f208e8..aac6338629 100644 --- a/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp +++ b/cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp @@ -264,7 +264,9 @@ namespace cocostudio widget->setColor(_color); widget->setOpacity(_opacity); //the setSize method will be conflict with scale9Width & scale9Height - widget->setSize(Size(_width, _height)); + if (!widget->isIgnoreContentAdaptWithSize()) { + widget->setSize(Size(_width, _height)); + } widget->setPosition(_position); widget->setAnchorPoint(_originalAnchorPoint); }