Commit f6146632 authored by Leandro Melo's avatar Leandro Melo
Browse files

Snippets: Correct top-left/bottom-right when emiting dataChanged

parent 1175705b
......@@ -239,7 +239,10 @@ void SnippetsTableModel::replaceSnippet(const Snippet &snippet, const QModelInde
m_collection->computeReplacementHint(row, snippet);
if (modelIndex.row() == hint.index()) {
m_collection->replaceSnippet(row, snippet, hint);
emit dataChanged(modelIndex, modelIndex);
if (modelIndex.column() == 0)
emit dataChanged(modelIndex, modelIndex.sibling(row, 1));
emit dataChanged(modelIndex.sibling(row, 0), modelIndex);
} else {
if (row < hint.index())
// Rows will be moved down.
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