mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 17:49:27 +02:00
Fix for one-frame glitch when changing dimensions of a model entity.
This was due to Model::setScaleToFit being called on the script thread instead of the main thread.
This commit is contained in:
parent
122902714a
commit
a07970f053
1 changed files with 3 additions and 1 deletions
|
@ -100,7 +100,9 @@ void ModelOverlay::setProperties(const QVariantMap& properties) {
|
||||||
if (newScale.x <= 0 || newScale.y <= 0 || newScale.z <= 0) {
|
if (newScale.x <= 0 || newScale.y <= 0 || newScale.z <= 0) {
|
||||||
setDimensions(scale);
|
setDimensions(scale);
|
||||||
} else {
|
} else {
|
||||||
_model->setScaleToFit(true, getDimensions());
|
QMetaObject::invokeMethod(_model.get(), "setScaleToFit", Qt::AutoConnection,
|
||||||
|
Q_ARG(const bool&, true),
|
||||||
|
Q_ARG(const glm::vec3&, getDimensions()));
|
||||||
_updateModel = true;
|
_updateModel = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue