diff options
Diffstat (limited to 'src/gui/text/qtextdocument_p.h')
-rw-r--r-- | src/gui/text/qtextdocument_p.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h index 36f3241..ce25c57 100644 --- a/src/gui/text/qtextdocument_p.h +++ b/src/gui/text/qtextdocument_p.h @@ -201,10 +201,9 @@ public: inline void undo() { undoRedo(true); } inline void redo() { undoRedo(false); } void appendUndoItem(QAbstractUndoItem *); - inline void beginEditBlock() { editBlock++; } + inline void beginEditBlock() { if (0 == editBlock++) ++revision; } void joinPreviousEditBlock(); void endEditBlock(); - inline void beginEdit() { inEdit = true; } void finishEdit(); inline bool isInEditBlock() const { return editBlock; } void enableUndoRedo(bool enable); @@ -306,6 +305,7 @@ private: QVector<QTextUndoCommand> undoStack; bool undoEnabled; int undoState; + int revision; // position in undo stack of the last setModified(false) call int modifiedState; bool modified; @@ -340,7 +340,6 @@ public: int maximumBlockCount; uint needsEnsureMaximumBlockCount : 1; uint inContentsChange : 1; - uint inEdit : 1; // between beginEdit() and finishEdit() QSizeF pageSize; QString title; QString url; |