forked from qt-creator/qt-creator
Git/DiffEditor: Fix staging added/removed lines separately
Fixes: QTCREATORBUG-23243 Change-Id: Ice19e1c778aabd9cb1b9fe0681234073de85cfcb Reviewed-by: hjk <hjk@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -875,7 +875,7 @@ void GitClient::chunkActionsRequested(QMenu *menu, int fileIndex, int chunkIndex
|
||||
stageChunk(diffController, fileIndex, chunkIndex,
|
||||
DiffEditorController::NoOption, DiffEditor::ChunkSelection());
|
||||
});
|
||||
QAction *stageLinesAction = menu->addAction(tr("Stage %n Line(s)", "", selection.selectedRowsCount));
|
||||
QAction *stageLinesAction = menu->addAction(tr("Stage Selection (%n Lines)", "", selection.selectedRowsCount()));
|
||||
connect(stageLinesAction, &QAction::triggered, this,
|
||||
[stageChunk, diffController, fileIndex, chunkIndex, selection]() {
|
||||
stageChunk(diffController, fileIndex, chunkIndex,
|
||||
@@ -887,7 +887,7 @@ void GitClient::chunkActionsRequested(QMenu *menu, int fileIndex, int chunkIndex
|
||||
stageChunk(diffController, fileIndex, chunkIndex,
|
||||
DiffEditorController::Revert, DiffEditor::ChunkSelection());
|
||||
});
|
||||
QAction *unstageLinesAction = menu->addAction(tr("Unstage %n Line(s)", "", selection.selectedRowsCount));
|
||||
QAction *unstageLinesAction = menu->addAction(tr("Unstage Selection (%n Lines)", "", selection.selectedRowsCount()));
|
||||
connect(unstageLinesAction, &QAction::triggered, this,
|
||||
[stageChunk, diffController, fileIndex, chunkIndex, selection]() {
|
||||
stageChunk(diffController, fileIndex, chunkIndex,
|
||||
|
||||
Reference in New Issue
Block a user