Improve Copy/CutLine actions usability

This patch implements two features:
1. Reimplement CopyLine to move text cursor at the beginning of line
2. Add copy/cutLine action to Advanced Edit menu, to make it
   discoverable for editor users.

Change-Id: I0bf336ebee4dbf5afd2c759e47b1830271bd9d18
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
Frantisek Vacek
2014-02-24 12:08:39 +01:00
committed by David Schulz
parent f3973ebcfd
commit fa998d2d2c
4 changed files with 13 additions and 6 deletions

View File

@@ -5060,6 +5060,8 @@ void BaseTextEditorWidget::copyLine()
QTextCursor prevCursor = textCursor();
maybeSelectLine();
copy();
if (!prevCursor.hasSelection())
prevCursor.movePosition(QTextCursor::StartOfBlock);
setTextCursor(prevCursor);
}