Commit e8aa4d07 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

don't misuse remove rows, use full reset

before we did emit wrong signals with invalid
removal ranges
parent 79c445e8
Pipeline #167884 failed with stage
in 12 minutes and 4 seconds
......@@ -443,7 +443,7 @@ void KateFileTreeModel::clearModel()
// remove all items
// can safely ignore documentClosed here
beginRemoveRows(QModelIndex(), 0, qMax(m_root->childCount() - 1, 0));
beginResetModel();
delete m_root;
m_root = new ProxyItemDir(QStringLiteral("m_root"), nullptr);
......@@ -453,7 +453,7 @@ void KateFileTreeModel::clearModel()
m_editHistory.clear();
m_brushes.clear();
endRemoveRows();
endResetModel();
}
void KateFileTreeModel::connectDocument(const KTextEditor::Document *doc)
......
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