diff -r e628fc2e0c72 -r 03f8e6d42e13 src/ui/objecteditor.cpp --- a/src/ui/objecteditor.cpp Thu Mar 03 21:13:16 2022 +0200 +++ b/src/ui/objecteditor.cpp Fri Mar 04 11:37:50 2022 +0200 @@ -1,9 +1,10 @@ #include #include "objecteditor.h" +#include "document.h" -ObjectEditor::ObjectEditor(Model* model, const ldraw::id_t id, QWidget *parent) : - QWidget{parent}, - model{model} +ObjectEditor::ObjectEditor(Document* document, const ldraw::id_t id) : + QWidget{document}, + document{document} { this->setObjectId(id); this->setLayout(new QVBoxLayout{this}); @@ -12,12 +13,12 @@ void ObjectEditor::setObjectId(const ldraw::id_t id) { this->objectId = id; - const ldraw::Object* object = this->model->get(id); + const ldraw::Object* object = this->document->getModel().get(id); if (object != nullptr and object->numPoints() > 0) { if (not this->polygonEditor.has_value()) { - this->polygonEditor.emplace(this->model, id); + this->polygonEditor.emplace(this->document, id); this->layout()->addWidget(&*this->polygonEditor); } else