Skip to content
This repository was archived by the owner on Mar 4, 2023. It is now read-only.

Commit 6efd4dd

Browse files
committed
add missing model notifiers
1 parent a33363a commit 6efd4dd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/datasync/datastoremodel.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,13 @@ void DataStoreModel::addRole(int column, int role, const char *propertyName)
247247

248248
void DataStoreModel::clearColumns()
249249
{
250+
const auto cColumns = d->columns.size() > 1;
251+
if(cColumns)
252+
beginRemoveColumns({}, 1, d->columns.size() - 1);
250253
d->columns.clear();
251254
d->roleMapping.clear();
255+
if(cColumns)
256+
endRemoveColumns();
252257
}
253258

254259
void DataStoreModel::setTypeId(int typeId)

0 commit comments

Comments
 (0)