Mercurial > trustbridge
changeset 1311:135891f1c8f4
(issue154) Do not force the details button to be active if a certificate changes
This reuses the activate function to reduce redundancy.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 13 Oct 2014 14:21:27 +0200 |
parents | 60e481aa75ca |
children | b0bdccc4ee2d |
files | ui/mainwindow.cpp |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ui/mainwindow.cpp Mon Oct 13 14:13:05 2014 +0200 +++ b/ui/mainwindow.cpp Mon Oct 13 14:21:27 2014 +0200 @@ -1223,9 +1223,9 @@ .arg(mUpdatesNew->selectedCertCount()) .arg(mUpdatesNew->certificates().size()) + "</h3>"); - mUpdatesDetailsNew->show(); - mUpdatesDetailsNew->setIcon(QIcon(":/img/dialog-information_16px.png")); - mUpdatesDetailsNew->setToolTip(tr("Show details")); + if (!mUpdatesNew->isVisible()) { + activateDetailsButton(mUpdatesDetailsNew); + } mUpdatesNewCertificates->show(); } else { mUpdatesDetailsNew->hide(); @@ -1240,9 +1240,9 @@ .arg(mUpdatesRemove->certificates().size()) + "</h3>"); mUpdatesRemoveCertificates->show(); - mUpdatesDetailsRemove->setIcon(QIcon(":/img/dialog-information_16px.png")); - mUpdatesDetailsRemove->setToolTip(tr("Show details")); - mUpdatesDetailsRemove->show(); + if (!mUpdatesRemove->isVisible()) { + activateDetailsButton(mUpdatesDetailsRemove); + } } else { mUpdatesRemoveCertificates->hide(); mUpdatesDetailsRemove->hide(); @@ -1676,6 +1676,7 @@ btn->setToolTip(QObject::tr("Show details")); btn->setText(" " + QObject::tr("Details")); btn->setIcon(QIcon(":/img/dialog-information_16px.png")); + btn->show(); } void MainWindow::toggleUpdatesNew() {