attempt to fix first time model overlay loading

This commit is contained in:
SamGondelman 2018-06-08 13:56:21 -07:00
parent df0ecb44a8
commit 310e2ee063

View file

@ -123,6 +123,9 @@ void ModelOverlay::update(float deltatime) {
if (!_texturesLoaded && _model->getGeometry() && _model->getGeometry()->areTexturesLoaded()) {
_texturesLoaded = true;
if (!_modelTextures.isEmpty()) {
_model->setTextures(_modelTextures);
}
_model->updateRenderItems();
}
}
@ -221,8 +224,7 @@ void ModelOverlay::setProperties(const QVariantMap& properties) {
if (texturesValue.isValid() && texturesValue.canConvert(QVariant::Map)) {
_texturesLoaded = false;
QVariantMap textureMap = texturesValue.toMap();
QMetaObject::invokeMethod(_model.get(), "setTextures", Qt::AutoConnection,
Q_ARG(const QVariantMap&, textureMap));
_modelTextures = textureMap;
}
auto groupCulledValue = properties["isGroupCulled"];