Get remap textures through getter

This commit is contained in:
Zach Pomerantz 2016-03-30 14:11:36 -07:00
parent b72c28854c
commit e4f12c81e0

View file

@ -117,12 +117,11 @@ QVariantMap RenderableModelEntityItem::parseTexturesToMap(QString textures) {
QJsonParseError error;
QJsonDocument texturesJson = QJsonDocument::fromJson(textures.toUtf8(), &error);
if (error.error != QJsonParseError::NoError) {
qCWarning(entitiesrenderer) << "Could not evaluate textures property value:" << _textures;
qCWarning(entitiesrenderer) << "Could not evaluate textures property value:" << textures;
return _originalTextures;
}
auto parsed = texturesJson.toVariant();
return parsed.toMap();
return texturesJson.toVariant().toMap();
}
void RenderableModelEntityItem::remapTextures() {
@ -144,7 +143,7 @@ void RenderableModelEntityItem::remapTextures() {
_currentTextures = _originalTextures;
}
auto textures = parseTexturesToMap(_textures);
auto textures = parseTexturesToMap(getTextures());
if (textures != _currentTextures) {
geometry->setTextures(textures);