src/linetypes/object.cpp

changeset 89
7abaf1d64719
parent 86
4bec0525ef1b
child 132
488d0ba6070b
--- a/src/linetypes/object.cpp	Mon May 11 12:18:04 2020 +0300
+++ b/src/linetypes/object.cpp	Mon May 11 12:18:59 2020 +0300
@@ -1,6 +1,8 @@
 #include <QBrush>
 #include <QFont>
 #include "object.h"
+#include "widgets/vec3editor.h"
+#include "modeleditcontext.h"
 
 static std::int32_t getIdForNewObject()
 {
@@ -87,7 +89,7 @@
 	switch (id)
 	{
 	case Property::Color:
-		return colorIndex.index;
+		return QVariant::fromValue<Color>(colorIndex);
 	default:
 		return Object::getProperty(id);
 	}
@@ -95,7 +97,7 @@
 
 void ldraw::ColoredObject::setProperty(SetPropertyResult* result, const PropertyKeyValue& pair)
 {
-	LDRAW_OBJECT_HANDLE_SET_PROPERTY(Color, {colorIndex.index = value;});
+	LDRAW_OBJECT_HANDLE_SET_PROPERTY(Color, {colorIndex = value;});
 	Object::setProperty(result, pair);
 }
 

mercurial