diff -r 40e2940605a3 -r 4bec0525ef1b src/linetypes/edge.cpp --- a/src/linetypes/edge.cpp Wed Mar 18 17:11:23 2020 +0200 +++ b/src/linetypes/edge.cpp Thu Mar 19 21:06:06 2020 +0200 @@ -19,29 +19,20 @@ { switch (property) { - case Property::Point1: + case Property::Point0: return QVariant::fromValue(point_1); - case Property::Point2: + case Property::Point1: return QVariant::fromValue(point_2); default: return BaseClass::getProperty(property); } } -auto ldraw::Edge::setProperty(Property property, const QVariant& value) - -> SetPropertyResult +void ldraw::Edge::setProperty(SetPropertyResult* result, const PropertyKeyValue& pair) { - switch (property) - { - case Property::Point1: - point_1 = value.value(); - return SetPropertyResult::Success; - case Property::Point2: - point_2 = value.value(); - return SetPropertyResult::Success; - default: - return BaseClass::setProperty(property, value); - } + LDRAW_OBJECT_HANDLE_SET_PROPERTY(Point0, {this->point_1 = value;}) + LDRAW_OBJECT_HANDLE_SET_PROPERTY(Point1, {this->point_2 = value;}) + BaseClass::setProperty(result, pair); } QString ldraw::Edge::textRepresentation() const