summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocument_p.cpp
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-11-19 13:53:04 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-11-19 13:53:04 (GMT)
commit4e53466f63bf05e90a69f80fda8580dabc1e9ed0 (patch)
tree0978f427af78291d8dd16004cc4ca33dbe1af433 /src/gui/text/qtextdocument_p.cpp
parent5bd71902f97ba75dc93ccf709dbfdd2ffeb361b2 (diff)
parentfbbdf8698fb0444d5170b7d0a14e870ea789398f (diff)
downloadQt-4e53466f63bf05e90a69f80fda8580dabc1e9ed0.zip
Qt-4e53466f63bf05e90a69f80fda8580dabc1e9ed0.tar.gz
Qt-4e53466f63bf05e90a69f80fda8580dabc1e9ed0.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
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();
}
}