Merge pull request #13479 from liamcindy/V3.8_reader

fix object size error while data is error
This commit is contained in:
pandamicro 2015-08-20 18:09:28 +08:00
commit 81ca089d27
2 changed files with 5 additions and 5 deletions

View File

@ -235,7 +235,10 @@ namespace cocostudio
tmx = TMXTiledMap::create(path);
if (tmx)
{
//prevent that editor's data does not match in size and resources
Size fileSize = tmx->getContentSize();
setPropsWithFlatBuffers(tmx, (Table*)gameMapOptions);
tmx->setContentSize(fileSize);
}
}
else

View File

@ -167,6 +167,8 @@ namespace cocostudio
Sprite *sprite = static_cast<Sprite*>(node);
auto options = (SpriteOptions*)spriteOptions;
auto nodeReader = NodeReader::getInstance();
nodeReader->setPropsWithFlatBuffers(node, (Table*)(options->nodeOptions()));
auto fileNameData = options->fileNameData();
@ -242,11 +244,6 @@ namespace cocostudio
sprite->setBlendFunc(blendFunc);
}
auto nodeReader = NodeReader::getInstance();
nodeReader->setPropsWithFlatBuffers(node, (Table*)(options->nodeOptions()));
auto nodeOptions = options->nodeOptions();
GLubyte alpha = (GLubyte)nodeOptions->color()->a();