From 1c90282bdb6508a4f35d098413be8f00087b66b6 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann <Thomas.Hartmann@nokia.com> Date: Wed, 20 Jan 2010 15:19:19 +0100 Subject: [PATCH] QmlDesigner.Rewriter: setting textModifier to lastCorrectQmlSource If rewrting fails we have to set back the textModifier Reviewed-by: Erik Verbruggen --- src/plugins/qmldesigner/core/model/rewriterview.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/qmldesigner/core/model/rewriterview.cpp b/src/plugins/qmldesigner/core/model/rewriterview.cpp index eb3dd12e0d1..d19d735a845 100644 --- a/src/plugins/qmldesigner/core/model/rewriterview.cpp +++ b/src/plugins/qmldesigner/core/model/rewriterview.cpp @@ -438,6 +438,7 @@ void RewriterView::enterErrorState(const QString &errorMessage) void RewriterView::resetToLastCorrectQml() { + m_textModifier->textDocument()->setPlainText(lastCorrectQmlSource); ModelAmender differenceHandler(m_textToModelMerger.data()); m_textToModelMerger->load(lastCorrectQmlSource.toUtf8(), differenceHandler); -- GitLab