--- a/src/linetypes/modelobject.h Sun Mar 05 13:33:37 2017 +0200 +++ b/src/linetypes/modelobject.h Sun Mar 05 16:47:52 2017 +0200 @@ -22,6 +22,7 @@ #include "../basics.h" #include "../glShared.h" #include "../colors.h" +#include "../types/resourcevector.h" class Model; class LDDocument; @@ -95,7 +96,9 @@ void codeChanged(QString before, QString after); protected: + friend class ResourceVector<LDObject>; friend class Model; + LDObject (Model* model = nullptr); virtual ~LDObject(); void setDocument(Model* model); @@ -159,7 +162,7 @@ QString typeName() const override { return "error"; } protected: - friend class Model; + friend class ResourceVector<LDObject>; LDError (Model* model); LDError (QString contents, QString reason, Model* model = nullptr); @@ -202,7 +205,7 @@ virtual QString asText() const override; virtual void invert() override; protected: - friend class Model; + friend class ResourceVector<LDObject>; LDBfc (Model* model); public: @@ -249,7 +252,7 @@ QString typeName() const override { return "subfilereference"; } protected: - friend class Model; + friend class ResourceVector<LDObject>; LDSubfileReference (Model* model); LDSubfileReference(LDDocument* reference, const Matrix& transformationMatrix, const Vertex& position, Model* model = nullptr); @@ -280,7 +283,7 @@ QString typeName() const override { return "beziercurve"; } protected: - friend class Model; + friend class ResourceVector<LDObject>; LDBezierCurve (Model* model); LDBezierCurve (const Vertex& v0, const Vertex& v1, const Vertex& v2, const Vertex& v3, Model* model = nullptr); };