forked from qt-creator/qt-creator
Git: Expand branches also on internal model refresh
Change-Id: I91e3b875be1a2c3b5da9ae7720709b34a7d83232 Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
8478e35384
commit
07921dee77
@@ -92,6 +92,7 @@ BranchDialog::BranchDialog(QWidget *parent) :
|
||||
connect(m_model, &QAbstractItemModel::dataChanged, this, &BranchDialog::resizeColumns);
|
||||
connect(m_model, &QAbstractItemModel::rowsInserted, this, &BranchDialog::resizeColumns);
|
||||
connect(m_model, &QAbstractItemModel::rowsRemoved, this, &BranchDialog::resizeColumns);
|
||||
connect(m_model, &QAbstractItemModel::modelReset, this, &BranchDialog::expandAndResize);
|
||||
|
||||
m_ui->branchView->selectionModel()->clear();
|
||||
}
|
||||
@@ -111,7 +112,10 @@ void BranchDialog::refresh(const QString &repository, bool force)
|
||||
QString errorMessage;
|
||||
if (!m_model->refresh(m_repository, &errorMessage))
|
||||
VcsOutputWindow::appendError(errorMessage);
|
||||
}
|
||||
|
||||
void BranchDialog::expandAndResize()
|
||||
{
|
||||
m_ui->branchView->expandAll();
|
||||
resizeColumns();
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ public:
|
||||
void refreshIfSame(const QString &repository);
|
||||
|
||||
private:
|
||||
void expandAndResize();
|
||||
void resizeColumns();
|
||||
void enableButtons();
|
||||
void refreshCurrentRepository();
|
||||
|
||||
Reference in New Issue
Block a user