summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocument_p.h
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2009-05-08 14:39:42 (GMT)
committermae <qt-info@nokia.com>2009-05-08 14:42:51 (GMT)
commit4af30f47c37fd0e6826aca2984dd0f567dc7e465 (patch)
treea06a574de77a49c0e87ffabd46533a38386aee85 /src/gui/text/qtextdocument_p.h
parentda1234d6ea6c5e3c0b84d64fbe9ac15a7c3f30d3 (diff)
downloadQt-4af30f47c37fd0e6826aca2984dd0f567dc7e465.zip
Qt-4af30f47c37fd0e6826aca2984dd0f567dc7e465.tar.gz
Qt-4af30f47c37fd0e6826aca2984dd0f567dc7e465.tar.bz2
Fixed unwanted merging of undo commands from different edit blocks
With this patch, commands no longer merge across block bounderies. In order to have merging still work for the normal insertion and deletion case, the unnecessary beginEditBlock()/endEditBlock() calls where cleaned up. Reviewed-by: Simon Hausmann
Diffstat (limited to 'src/gui/text/qtextdocument_p.h')
-rw-r--r--src/gui/text/qtextdocument_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h
index 25763e1..d754ff0 100644
--- a/src/gui/text/qtextdocument_p.h
+++ b/src/gui/text/qtextdocument_p.h
@@ -139,7 +139,7 @@ public:
MoveCursor = 1
};
quint16 command;
- quint8 block; ///< All undo commands that have this set to zero/false are combined with the preceding command on undo/redo.
+ quint8 block; ///< All undo commands that have this set to true are combined with the preceding command on undo/redo.
quint8 operation;
int format;
quint32 strPos;
@@ -202,6 +202,7 @@ public:
inline void beginEditBlock() { editBlock++; }
void joinPreviousEditBlock();
void endEditBlock();
+ void finishEdit();
inline bool isInEditBlock() const { return editBlock; }
void enableUndoRedo(bool enable);
inline bool isUndoRedoEnabled() const { return undoEnabled; }