summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-02-05 10:32:48 +0000
committerAndras Timar <andras.timar@collabora.com>2024-02-06 12:28:51 +0100
commita095f81eb4bed9c0b67651de9206a5ecc643f274 (patch)
treedb39658309150b22d4e83ff5e2147f62b2ab5f0d
parent3d6c2e298337569775585f4569ebc1feb89bce9a (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/+/162906 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-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 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)
{