forked from qt-creator/qt-creator
Git: BranchDialog: Disable buttons when selection disappears
Steps to reproduce the old and wrong behavior: 1. Open branch dialog 2. Select a branch 3. Select checkout 4. Branch is checked out, but no longer selected 5. Buttons like "Log" stay enabled, but don't serve any purpose Change-Id: I3974b7cb87553d1ff57fd5578b908f02c949a509 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
André Hartmann
parent
0e25c08942
commit
95e6dfe8e0
@@ -93,7 +93,7 @@ BranchDialog::BranchDialog(QWidget *parent) :
|
||||
connect(m_model, &QAbstractItemModel::rowsInserted, this, &BranchDialog::resizeColumns);
|
||||
connect(m_model, &QAbstractItemModel::rowsRemoved, this, &BranchDialog::resizeColumns);
|
||||
|
||||
enableButtons();
|
||||
m_ui->branchView->selectionModel()->clear();
|
||||
}
|
||||
|
||||
BranchDialog::~BranchDialog()
|
||||
@@ -258,7 +258,7 @@ void BranchDialog::checkout()
|
||||
else if (branchCheckoutDialog.popStashOfNextBranch())
|
||||
client->synchronousStashRestore(m_repository, stashName, true);
|
||||
}
|
||||
enableButtons();
|
||||
m_ui->branchView->selectionModel()->clear();
|
||||
}
|
||||
|
||||
/* Prompt to delete a local branch and do so. */
|
||||
@@ -320,7 +320,7 @@ void BranchDialog::rename()
|
||||
m_model->renameBranch(oldName, branchAddDialog.branchName());
|
||||
refreshCurrentRepository();
|
||||
}
|
||||
enableButtons();
|
||||
m_ui->branchView->selectionModel()->clear();
|
||||
}
|
||||
|
||||
void BranchDialog::diff()
|
||||
|
Reference in New Issue
Block a user