diff options
-rw-r--r-- | src/gui/text/qtextdocument_p.cpp | 7 | ||||
-rw-r--r-- | src/gui/text/qtextdocument_p.h | 1 |
2 files changed, 0 insertions, 8 deletions
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index 9849317..9bcf8b4 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -205,7 +205,6 @@ QTextDocumentPrivate::QTextDocumentPrivate() undoEnabled = true; inContentsChange = false; - inRemove = false; defaultTextOption.setTabStop(80); // same as in qtextengine.cpp defaultTextOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); @@ -670,10 +669,7 @@ void QTextDocumentPrivate::remove(int pos, int length, QTextUndoCommand::Operati { if (length == 0) return; - inRemove = true; move(pos, -1, length, op); - inRemove = false; - adjustDocumentChangesAndCursors(pos, -length, op); } void QTextDocumentPrivate::setCharFormat(int pos, int length, const QTextCharFormat &newFormat, FormatChangeMode mode) @@ -1269,9 +1265,6 @@ void QTextDocumentPrivate::documentChange(int from, int length) */ void QTextDocumentPrivate::adjustDocumentChangesAndCursors(int from, int addedOrRemoved, QTextUndoCommand::Operation op) { - if (inRemove) // postpone, will be called again from QTextDocumentPrivate::remove() - return; - if (!editBlock) ++revision; diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h index dcac99d..b9d5f5a 100644 --- a/src/gui/text/qtextdocument_p.h +++ b/src/gui/text/qtextdocument_p.h @@ -345,7 +345,6 @@ public: int maximumBlockCount; uint needsEnsureMaximumBlockCount : 1; uint inContentsChange : 1; - uint inRemove : 1; QSizeF pageSize; QString title; QString url; |