Mercurial > trustbridge
changeset 446:43090637d6ae
Check if list item is checkable before adding the item to unselected list.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 23 Apr 2014 11:55:28 +0200 |
parents | b3721ded6f5b |
children | b1b14daf2116 |
files | ui/mainwindow.cpp |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ui/mainwindow.cpp Wed Apr 23 11:53:57 2014 +0200 +++ b/ui/mainwindow.cpp Wed Apr 23 11:55:28 2014 +0200 @@ -623,7 +623,8 @@ mSettings.remove(""); /* Clears old choices */ for (int i = 0; i < mCertListWidget->count(); i++) { QListWidgetItem *item = mCertListWidget->item(i); - if (item->checkState() != Qt::Checked) { + if (item->checkState() != Qt::Checked && + (item->flags() & Qt::ItemIsUserCheckable)) { mSettings.setValue(QString::fromLatin1("cert%1").arg(i), item->data(CertificateItemDelegate::DataRole).value<Certificate>().base64Line()); }