forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.8'
Conflicts: src/plugins/winrt/winrtdevicefactory.cpp Change-Id: I33b8697e2ebf2bea051d7f1144449e0743ee16a5
This commit is contained in:
@@ -318,14 +318,16 @@ bool BranchView::add()
|
||||
branchAddDialog.setTrackedBranchName(isTracked ? trackedBranch : QString(), !isLocal);
|
||||
|
||||
if (branchAddDialog.exec() == QDialog::Accepted) {
|
||||
QModelIndex idx = m_model->addBranch(branchAddDialog.branchName(), branchAddDialog.track(), trackedIndex);
|
||||
QModelIndex idx = m_model->addBranch(branchAddDialog.branchName(), branchAddDialog.track(),
|
||||
trackedIndex);
|
||||
if (!idx.isValid())
|
||||
return false;
|
||||
QModelIndex mappedIdx = m_filterModel->mapFromSource(idx);
|
||||
QTC_ASSERT(m_branchView, return false);
|
||||
m_branchView->selectionModel()->select(idx, QItemSelectionModel::Clear
|
||||
m_branchView->selectionModel()->select(mappedIdx, QItemSelectionModel::Clear
|
||||
| QItemSelectionModel::Select
|
||||
| QItemSelectionModel::Current);
|
||||
m_branchView->scrollTo(idx);
|
||||
m_branchView->scrollTo(mappedIdx);
|
||||
if (QMessageBox::question(this, tr("Checkout"), tr("Checkout branch?"),
|
||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
|
||||
return checkout();
|
||||
|
||||
Reference in New Issue
Block a user