summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-02-05 10:32:48 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-02-05 13:41:00 +0100
commitcf4514d4e7400480174f28dcf502f5b59fe7b085 (patch)
tree10f9763a56ad072b9b26b387304af71c5d7d491f /xmlsecurity
parentd918beda2ab42668014b0dd42996b6ccc97e8c3a (diff)
Resolves: tdf#156352 disable sorting while adding rows
looks like the new row gets sorted immediately when added as an empty row into the first row, so accessing it by index later to set it text/id get an unexpected result. pause sorting while inserting the entries and enable it again when finished for the easiest fix. Change-Id: Ib028b193afbf2b9026841b19419e012b70448e39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162993 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/dialogs/certificatechooser.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx
index a54575972c26..faea635f1be9 100644
--- a/xmlsecurity/source/dialogs/certificatechooser.cxx
+++ b/xmlsecurity/source/dialogs/certificatechooser.cxx
@@ -56,7 +56,6 @@ CertificateChooser::CertificateChooser(weld::Window* _pParent,
{
auto nControlWidth = m_xCertLB->get_approximate_digit_width() * 105;
m_xCertLB->set_size_request(nControlWidth, m_xCertLB->get_height_rows(12));
- m_xCertLB->make_sorted();
m_xCertLB->connect_changed( LINK( this, CertificateChooser, CertificateHighlightHdl ) );
m_xCertLB->connect_row_activated( LINK( this, CertificateChooser, CertificateSelectHdl ) );
@@ -136,6 +135,7 @@ void CertificateChooser::ImplInitialize(bool mbSearch)
return;
m_xCertLB->clear();
+ m_xCertLB->make_unsorted();
m_xCertLB->freeze();
SvtUserOptions aUserOpts;
@@ -257,6 +257,7 @@ void CertificateChooser::ImplInitialize(bool mbSearch)
m_xCertLB->thaw();
m_xCertLB->unselect_all();
+ m_xCertLB->make_sorted();
if (oSelectRow)
{