aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Skec <skec@protonmail.ch>2021-05-02 10:03:23 +1000
committerFelix Queißner <felix@ib-queissner.de>2021-05-02 10:17:17 +0200
commitb802f1959911d0e486c72268a43f4f6c3eb1b9c7 (patch)
tree39c79364933c11563028f35998ac3095e6aa39e2 /src
parent86959d55a041ad9bf113d0f600d8f0ad5e8220c8 (diff)
downloadkristall-b802f1959911d0e486c72268a43f4f6c3eb1b9c7.tar.gz
Fix for #233
Diffstat (limited to 'src')
-rw-r--r--src/widgets/ssltrusteditor.cpp5
-rw-r--r--src/widgets/ssltrusteditor.ui3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/widgets/ssltrusteditor.cpp b/src/widgets/ssltrusteditor.cpp
index 584e926..e740977 100644
--- a/src/widgets/ssltrusteditor.cpp
+++ b/src/widgets/ssltrusteditor.cpp
@@ -56,7 +56,10 @@ void SslTrustEditor::setTrust(const SslTrust &trust)
void SslTrustEditor::on_trust_revoke_selected_clicked()
{
- this->current_trust.trusted_hosts.remove(this->ui->trusted_hosts->currentIndex());
+ const QModelIndex &idx =
+ static_cast<QSortFilterProxyModel*>(this->ui->trusted_hosts->model())
+ ->mapToSource(this->ui->trusted_hosts->currentIndex());
+ this->current_trust.trusted_hosts.remove(idx);
}
void SslTrustEditor::on_trust_enable_ca_clicked()
diff --git a/src/widgets/ssltrusteditor.ui b/src/widgets/ssltrusteditor.ui
index 8bc55f4..c8b5b8d 100644
--- a/src/widgets/ssltrusteditor.ui
+++ b/src/widgets/ssltrusteditor.ui
@@ -66,6 +66,9 @@
<property name="cornerButtonEnabled">
<bool>true</bool>
</property>
+ <property name="selectionMode">
+ <enum>QAbstractItemView::SingleSelection</enum>
+ </property>
</widget>
</item>
<item>