Commit d8a4138d authored by David Redondo's avatar David Redondo 🏎
Browse files

Only emit dataChanged when we have sourceModel

Otherwise we will end up emitting dataChanged for invalid indices
parent 927c81c4
......@@ -77,7 +77,9 @@ void ColumnDisplayModel::setColumnDisplay(const QVariantMap &newColumnDisplay)
m_columnDisplay = display;
Q_EMIT columnDisplayChanged();
Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1));
if (sourceModel()) {
Q_EMIT dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1));
}
}
QStringList ColumnDisplayModel::visibleColumnIds() const
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment