Mercurial > trustbridge
comparison ui/certificatelistwidget.cpp @ 720:3d669400104a
(Issue23) Fix certificate selection
On show always the first certificate was selected and setSelected
also only set the first certificate.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 02 Jul 2014 17:03:44 +0200 |
parents | 0f4c480c41f4 |
children | a467204a35f5 |
comparison
equal
deleted
inserted
replaced
719:49bf73b5c7de | 720:3d669400104a |
---|---|
231 return false; | 231 return false; |
232 } | 232 } |
233 | 233 |
234 void CertificateListWidget::setSelected(int index) | 234 void CertificateListWidget::setSelected(int index) |
235 { | 235 { |
236 if (index <= 0) { | |
237 index = 0; | |
238 } | |
236 mCertificateList->setFocus(); | 239 mCertificateList->setFocus(); |
237 if (mCertificateList->count() > 0) { | 240 mCertificateList->item(index)->setSelected(true); |
238 mCertificateList->item(0)->setSelected(true); | 241 mCertificateList->setCurrentRow(index); |
239 } | 242 } |
240 } |