From 7ca4a21a91d8873cc9abae098d5ae1d71aa7a75e Mon Sep 17 00:00:00 2001 From: Daniela Fontes Date: Mon, 18 Dec 2017 21:00:29 +0000 Subject: [PATCH] Fix entity property href not being able to reset (empty) once it was set with the correct input for the first time. --- libraries/entities/src/EntityItem.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/entities/src/EntityItem.cpp b/libraries/entities/src/EntityItem.cpp index 3498d2c4b1..89fde99f2a 100644 --- a/libraries/entities/src/EntityItem.cpp +++ b/libraries/entities/src/EntityItem.cpp @@ -961,7 +961,10 @@ void EntityItem::setMass(float mass) { void EntityItem::setHref(QString value) { auto href = value.toLower(); - if (! (value.toLower().startsWith("hifi://")) ) { + + // If the string has something and doesn't start with with "hifi://" it shouldn't be set + // We allow the string to be empty, because that's the initial state of this property + if ( !(value.toLower().startsWith("hifi://")) && !value.isEmpty()) { return; } withWriteLock([&] {