src/model.cpp

changeset 111
1f42c03fafca
parent 86
4bec0525ef1b
child 112
5760cbb32bc0
--- a/src/model.cpp	Sun Jul 25 16:29:08 2021 +0300
+++ b/src/model.cpp	Sun Jul 25 20:29:14 2021 +0300
@@ -124,6 +124,7 @@
 	emit beginInsertRows({}, position, position);
 	this->body.push_back(std::move(object));
 	emit endInsertRows();
+	this->needRecache = true;
 }
 
 void Model::remove(int position)
@@ -133,6 +134,7 @@
 		emit beginRemoveRows({}, position, position);
 		this->body.erase(std::begin(this->body) + position);
 		emit endRemoveRows();
+		this->needRecache = true;
 	}
 }
 

mercurial