Skip to content

Commit

Permalink
Fixed Qt6-only bug when no data is set in the proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
VSRonin committed Nov 4, 2021
1 parent 6f82de6 commit f51b263
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rolemaskproxymodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,10 @@ void RoleMaskProxyModel::multiData(const QModelIndex &index, QModelRoleDataSpan
Q_D(const RoleMaskProxyModel);
const QModelIndex sourceIndex = mapToSource(index);
sourceModel()->multiData(sourceIndex, roleDataSpan);
const FlaggedRolesContainer emptyData;
const FlaggedRolesContainer *idxData = d->dataForIndex(sourceIndex);
if (!idxData)
idxData = &emptyData;
for (QModelRoleData &roleData : roleDataSpan) {
int role = roleData.role();
if (d->m_mergeDisplayEdit && role == Qt::EditRole)
Expand Down

0 comments on commit f51b263

Please sign in to comment.