Skip to content
Snippets Groups Projects
Commit 5d95c35e authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

Fixing undo history mess-ups.

parent beb7724d
No related merge requests found
......@@ -433,9 +433,12 @@ void RewriterView::enterErrorState(const QString &errorMessage)
void RewriterView::resetToLastCorrectQml()
{
m_textModifier->textDocument()->setPlainText(lastCorrectQmlSource);
m_textModifier->textDocument()->undo();
// FIXME: enable the next line when commit 54290ef776a311f0c303e2a8df4de5e39e9a032a shows up in Qt.
// m_textModifier->textDocument()->clearUndoRedoStacks(QTextDocument::RedoStack);
ModelAmender differenceHandler(m_textToModelMerger.data());
m_textToModelMerger->load(lastCorrectQmlSource.toUtf8(), differenceHandler);
// m_textToModelMerger->load(lastCorrectQmlSource.toUtf8(), differenceHandler);
m_textToModelMerger->load(m_textModifier->text().toUtf8(), differenceHandler);
leaveErrorState();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment