forked from qt-creator/qt-creator
Git: Cancel adding a branch if the git operation fails
e.g. If a branch with the chosen name already exists Change-Id: I22be3001ed68d6bf6f45d9180ad60403267d4ad9 Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
3533ad2b48
commit
6a87d8d347
@@ -160,6 +160,8 @@ void BranchDialog::add()
|
||||
|
||||
if (branchAddDialog.exec() == QDialog::Accepted && m_model) {
|
||||
QModelIndex idx = m_model->addBranch(branchAddDialog.branchName(), branchAddDialog.track(), trackedIndex);
|
||||
if (!idx.isValid())
|
||||
return;
|
||||
m_ui->branchView->selectionModel()->select(idx, QItemSelectionModel::Clear
|
||||
| QItemSelectionModel::Select
|
||||
| QItemSelectionModel::Current);
|
||||
|
||||
Reference in New Issue
Block a user