src/linetypes/metacommand.cpp

changeset 86
4bec0525ef1b
parent 35
98906a94732f
child 132
488d0ba6070b
--- a/src/linetypes/metacommand.cpp	Wed Mar 18 17:11:23 2020 +0200
+++ b/src/linetypes/metacommand.cpp	Thu Mar 19 21:06:06 2020 +0200
@@ -15,20 +15,14 @@
 	}
 }
 
-auto ldraw::MetaCommand::setProperty(Property property, const QVariant& value)
-	-> SetPropertyResult
+void ldraw::MetaCommand::setProperty(ldraw::Object::SetPropertyResult* result, const PropertyKeyValue& pair)
 {
-	switch (property)
-	{
-	case Property::Text:
-		storedText = value.toString();
-		return SetPropertyResult::Success;
-	default:
-		return Object::setProperty(property, value);
-	}
+	LDRAW_OBJECT_HANDLE_SET_PROPERTY(Text, {this->storedText = value;});
+	BaseClass::setProperty(result, pair);
 }
 
 QString ldraw::MetaCommand::textRepresentation() const
 {
 	return this->storedText;
 }
+

mercurial