summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocument_p.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-11-18 14:20:15 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-11-18 14:20:15 (GMT)
commitf6555ca5d188eef577da6aa21d8a5d28e094a33a (patch)
tree1c91b3e753edb3534a5b82c367b2f237d2a0bd5d /src/gui/text/qtextdocument_p.cpp
parentfb4e81bdc692efe0db9aa38dd2b941578c0f0370 (diff)
parent7b41d3937c4521ba74b421da26d3a61a7aa4aa6e (diff)
downloadQt-f6555ca5d188eef577da6aa21d8a5d28e094a33a.zip
Qt-f6555ca5d188eef577da6aa21d8a5d28e094a33a.tar.gz
Qt-f6555ca5d188eef577da6aa21d8a5d28e094a33a.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6
Conflicts: configure.exe
Diffstat (limited to 'src/gui/text/qtextdocument_p.cpp')
-rw-r--r--src/gui/text/qtextdocument_p.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
index 2ad6512..18e1ffc 100644
--- a/src/gui/text/qtextdocument_p.cpp
+++ b/src/gui/text/qtextdocument_p.cpp
@@ -1114,9 +1114,11 @@ void QTextDocumentPrivate::endEditBlock()
return;
if (undoEnabled && undoState > 0) {
+ const bool wasBlocking = !undoStack[undoState - 1].block_end;
if (undoStack[undoState - 1].block_part) {
undoStack[undoState - 1].block_end = true;
- emit document()->undoCommandAdded();
+ if (wasBlocking)
+ emit document()->undoCommandAdded();
}
}