Commit 9228587b authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Hide remote in Push to Gerrit dialog if there is only 1



Change-Id: Id4b701e16f6edc74b2ad19b5255d84ceca5ec216
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent e844bee1
......@@ -115,12 +115,16 @@ GerritPushDialog::GerritPushDialog(const QString &workingDir, QWidget *parent) :
m_ui->remoteComboBox->setCurrentIndex(currIndex);
++currIndex;
}
if (m_ui->remoteComboBox->count() < 1)
const int remoteCount = m_ui->remoteComboBox->count();
if (remoteCount < 1) {
reject();
m_ui->remoteComboBox->setEnabled(m_ui->remoteComboBox->count() != 1);
connect(m_ui->remoteComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setRemoteBranches()));
return;
} else if (remoteCount == 1) {
m_ui->remoteLabel->hide();
m_ui->remoteComboBox->hide();
} else {
connect(m_ui->remoteComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setRemoteBranches()));
}
connect(m_ui->branchComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setChangeRange()));
setRemoteBranches();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment