Merge pull request #12019 from Delanir/C10594

Case 10594 - Fix entity property href not being able to reset (empty) ...
This commit is contained in:
Melissa Brown 2018-01-08 14:22:28 -08:00 committed by GitHub
commit 2fddace71e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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