diff options
Diffstat (limited to 'src/gui/text/qtextcontrol.cpp')
-rw-r--r-- | src/gui/text/qtextcontrol.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index 671dfc0..3c596e5 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -1201,7 +1201,8 @@ void QTextControlPrivate::keyPressEvent(QKeyEvent *e) blockFmt.setIndent(blockFmt.indent() - 1); cursor.setBlockFormat(blockFmt); } else { - cursor.deletePreviousChar(); + QTextCursor localCursor = cursor; + localCursor.deletePreviousChar(); } goto accept; } @@ -1239,7 +1240,8 @@ void QTextControlPrivate::keyPressEvent(QKeyEvent *e) } #endif else if (e == QKeySequence::Delete) { - cursor.deleteChar(); + QTextCursor localCursor = cursor; + localCursor.deleteChar(); } else if (e == QKeySequence::DeleteEndOfWord) { if (!cursor.hasSelection()) |