Commit 4efa780b authored by mae's avatar mae

Fix revisions when loading with multiple chunks

Done-with: Leandro Melo
parent d7896191
......@@ -527,11 +527,14 @@ bool BaseTextDocument::open(const QString &fileName)
interface.reportStarted();
d->m_document->setUndoRedoEnabled(false);
QTextCursor c(d->m_document);
c.beginEditBlock();
d->m_document->clear();
for (int i = 0; i < chunks; ++i) {
c.insertText(content.at(i));
interface.setProgressValue(i + 1);
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
}
c.endEditBlock();
d->m_document->setUndoRedoEnabled(true);
interface.reportFinished();
}
......
Markdown is supported
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