cleaner handling for QString/QUrl conversion/comparison

This commit is contained in:
Stephen Birarda 2015-11-24 11:17:46 -06:00
parent 6339c2c48f
commit 0e19e50047
2 changed files with 8 additions and 3 deletions

View file

@ -219,9 +219,13 @@ void RenderableModelEntityItem::render(RenderArgs* args) {
if (hasModel()) {
if (_model) {
if (getModelURL() != _model->getURL().toEncoded()) {
qDebug() << "Updating model URL: " << getModelURL();
_model->setURL(getModelURL());
// convert the QString from getModelURL to a URL
_url = getModelURL();
// check if the URL has changed
if (_url != _model->getURL()) {
qDebug() << "Updating model URL: " << _url;
_model->setURL(_url);
}
render::ScenePointer scene = AbstractViewStateInterface::instance()->getMain3DScene();

View file

@ -79,6 +79,7 @@ private:
bool _originalTexturesRead = false;
QVector<QVector<glm::vec3>> _points;
bool _dimensionsInitialized = true;
QUrl _url;
render::ItemID _myMetaItem;