mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 03:53:52 +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) {
|
||||
setDimensions(scale);
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue