From 76c934f01295a3af60cce5cd9a84996922abe10d Mon Sep 17 00:00:00 2001 From: David Rowe Date: Wed, 29 Nov 2017 10:41:21 +1300 Subject: [PATCH 1/3] Add missing line3d overlay property setters --- interface/src/ui/overlays/Line3DOverlay.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/interface/src/ui/overlays/Line3DOverlay.cpp b/interface/src/ui/overlays/Line3DOverlay.cpp index 66a6772aa5..0c63424ec0 100644 --- a/interface/src/ui/overlays/Line3DOverlay.cpp +++ b/interface/src/ui/overlays/Line3DOverlay.cpp @@ -166,10 +166,13 @@ void Line3DOverlay::setProperties(const QVariantMap& originalProperties) { bool newEndSet { false }; auto start = properties["start"]; - // if "start" property was not there, check to see if they included aliases: startPoint + // If "start" property was not there, check to see if they included aliases: startPoint, p1 if (!start.isValid()) { start = properties["startPoint"]; } + if (!start.isValid()) { + start = properties["p1"]; + } if (start.isValid()) { newStart = vec3FromVariant(start); newStartSet = true; @@ -177,10 +180,13 @@ void Line3DOverlay::setProperties(const QVariantMap& originalProperties) { properties.remove("start"); // so that Base3DOverlay doesn't respond to it auto end = properties["end"]; - // if "end" property was not there, check to see if they included aliases: endPoint + // If "end" property was not there, check to see if they included aliases: endPoint, p2 if (!end.isValid()) { end = properties["endPoint"]; } + if (!end.isValid()) { + end = properties["p2"]; + } if (end.isValid()) { newEnd = vec3FromVariant(end); newEndSet = true; From 3956b3b9532e117152b9642ab0584bbe3d7ec5c5 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Wed, 29 Nov 2017 10:41:51 +1300 Subject: [PATCH 2/3] Fix missing line3d overlay property setter overrides of base class --- interface/src/ui/overlays/Line3DOverlay.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interface/src/ui/overlays/Line3DOverlay.cpp b/interface/src/ui/overlays/Line3DOverlay.cpp index 0c63424ec0..8f2455fc8f 100644 --- a/interface/src/ui/overlays/Line3DOverlay.cpp +++ b/interface/src/ui/overlays/Line3DOverlay.cpp @@ -178,6 +178,8 @@ void Line3DOverlay::setProperties(const QVariantMap& originalProperties) { newStartSet = true; } properties.remove("start"); // so that Base3DOverlay doesn't respond to it + properties.remove("startPoint"); + properties.remove("p1"); auto end = properties["end"]; // If "end" property was not there, check to see if they included aliases: endPoint, p2 @@ -192,6 +194,8 @@ void Line3DOverlay::setProperties(const QVariantMap& originalProperties) { newEndSet = true; } properties.remove("end"); // so that Base3DOverlay doesn't respond to it + properties.remove("endPoint"); + properties.remove("p2"); auto length = properties["length"]; if (length.isValid()) { From b9ad15b19ee9a8206b064b2410ac22cb7b393d62 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Wed, 29 Nov 2017 11:03:16 +1300 Subject: [PATCH 3/3] Add missing line3d overlay property getters --- interface/src/ui/overlays/Line3DOverlay.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/interface/src/ui/overlays/Line3DOverlay.cpp b/interface/src/ui/overlays/Line3DOverlay.cpp index 8f2455fc8f..7dfec8e448 100644 --- a/interface/src/ui/overlays/Line3DOverlay.cpp +++ b/interface/src/ui/overlays/Line3DOverlay.cpp @@ -262,14 +262,23 @@ QVariant Line3DOverlay::getProperty(const QString& property) { if (property == "end" || property == "endPoint" || property == "p2") { return vec3toVariant(getEnd()); } + if (property == "length") { + return QVariant(getLength()); + } + if (property == "endParentID") { + return _endParentID; + } + if (property == "endParentJointIndex") { + return _endParentJointIndex; + } if (property == "localStart") { return vec3toVariant(getLocalStart()); } if (property == "localEnd") { return vec3toVariant(getLocalEnd()); } - if (property == "length") { - return QVariant(getLength()); + if (property == "glow") { + return getGlow(); } if (property == "lineWidth") { return _lineWidth;