Fix entity property href not being able to reset (empty) once it was set with

the correct input for the first time.
This commit is contained in:
Daniela Fontes 2017-12-18 21:00:29 +00:00
parent cfd2097f36
commit 7ca4a21a91

View file

@ -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([&] {