xmlsecurity/source/dialogs/certificatechooser.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 326246599fa9488caf1ffb33daa75042ab782cb8 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Feb 5 10:32:48 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Feb 5 16:43:07 2024 +0100 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/+/162906 Reviewed-by: Patrick Luby <guibomac...@gmail.com> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index 9dba3e9e9066..730549093390 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) {