diff -r 204dc77e5654 -r 7c4a63a02632 src/model.cpp --- a/src/model.cpp Sat Mar 07 01:25:37 2020 +0200 +++ b/src/model.cpp Mon Mar 09 22:12:50 2020 +0200 @@ -117,7 +117,20 @@ void Model::append(ModelObjectPointer&& object) { + const int position = static_cast(this->body.size()); + emit beginInsertRows({}, position, position); this->body.push_back(std::move(object)); + emit endInsertRows(); +} + +void Model::remove(int position) +{ + if (position >= 0 and position < signed_cast(this->body.size())) + { + emit beginRemoveRows({}, position, position); + this->body.erase(std::begin(this->body) + position); + emit endRemoveRows(); + } } ldraw::Object* Model::objectAt(const QModelIndex& index)