Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated new document changed code to work with undo/redo
because the cursor is not moved to the end of the change by an undo or redo operation when the document contents change signal is received, the current cursor cannot be used, so the document changed slot was modified to obtain the document text cursor, change the position of the cursor to the position of the start of the change, obtain info about this position, moved to the end of the position (using the number of characters added), and then get the info for this position (which the cursor will be moved to afterward) - this change will also work with all other kinds of changes also renamed some local variables in the document changed function removed the reimplemented undo and redo functions - not needed removed checks for undo and redo key sequences removed the undoAdded() slot - no need to keep track of line undos/redos removed m_lineModCount and m_undoActive - not needed
- Loading branch information
1 parent
ebffb44
commit a9db922
Showing
2 changed files
with
17 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters