--- a/src/model.h Wed Sep 22 00:25:13 2021 +0300 +++ b/src/model.h Wed Sep 22 00:25:31 2021 +0300 @@ -37,6 +37,7 @@ Model(QObject* parent = nullptr); Model(const Model&) = delete; int size() const; + ldraw::id_t at(int index) const; EditContext edit(); int rowCount(const QModelIndex&) const override; QVariant data(const QModelIndex& index, int role) const override; @@ -88,6 +89,8 @@ const int index, std::vector<gl::Polygon>& polygons_out, ldraw::GetPolygonsContext* context) const; + void editFinished(); + void objectModified(ldraw::id_t id); bool modified = false; QString path; LDHeader header; @@ -95,6 +98,7 @@ std::map<ldraw::id_t, ldraw::Object*> objectsById; mutable std::vector<gl::Polygon> cachedPolygons; mutable bool needRecache = true; + int editCounter = 0; }; /**