diff options
Diffstat (limited to 'src/gui/text/qtextcontrol.cpp')
-rw-r--r-- | src/gui/text/qtextcontrol.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index a2ee659..3d34687 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -747,7 +747,11 @@ void QTextControl::undo() { Q_D(QTextControl); d->repaintSelection(); + const int oldCursorPos = d->cursor.position(); d->doc->undo(&d->cursor); + if (d->cursor.position() != oldCursorPos) + emit cursorPositionChanged(); + emit microFocusChanged(); ensureCursorVisible(); } @@ -755,7 +759,11 @@ void QTextControl::redo() { Q_D(QTextControl); d->repaintSelection(); + const int oldCursorPos = d->cursor.position(); d->doc->redo(&d->cursor); + if (d->cursor.position() != oldCursorPos) + emit cursorPositionChanged(); + emit microFocusChanged(); ensureCursorVisible(); } |