summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2016-07-29 07:16:31 +0200
committerMontel Laurent <[email protected]>2016-07-29 07:16:31 +0200
commit77e2897472b83448960d3bfea89f991e62877982 (patch)
tree3fc2a573c8260a41fcf969187a4f984521aebe26
parenta92446d85eb0a16d1ede87f44d83b2405abc9be2 (diff)
Replace setPlainText as it clear the undo/redo so we can't fix error
-rw-r--r--src/ksieveui/editor/sieveeditortextmodewidget.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ksieveui/editor/sieveeditortextmodewidget.cpp b/src/ksieveui/editor/sieveeditortextmodewidget.cpp
index 5e7d09f..15187c7 100644
--- a/src/ksieveui/editor/sieveeditortextmodewidget.cpp
+++ b/src/ksieveui/editor/sieveeditortextmodewidget.cpp
@@ -242,7 +242,9 @@ void SieveEditorTextModeWidget::createRulesGraphically()
if (!requires.isEmpty()) {
newPlainText.prepend(requires + QLatin1Char('\n'));
}
- mTextEdit->setPlainText(newPlainText);
+ mTextEdit->selectAll();
+
+ mTextEdit->insertPlainText(newPlainText);
}
delete dlg;
}