diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-16 16:19:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-16 22:34:23 +0200 |
commit | f51ea6c297d17299c93e0560a9b4f90ebc2446d4 (patch) | |
tree | a6b16cbd836d3cf41b684a234c9bed371cb21d1f | |
parent | fa4ae1b318fef5984303f5906a9391d33d46bed7 (diff) |
tdf#134038 use mnCheckWidthReq to avoid text width calculation
when mnCheckWidthReq is available
Change-Id: I9964b1df9e025ab737d0d306148930c34b7d7148
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96474
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/ui/cctrl/checklistmenu.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index f095e66c2e6d..37d63fba77a8 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1180,6 +1180,7 @@ size_t ScCheckListMenuControl::initMembers() if (!mxChecks->n_children() && !mbHasDates) { + std::vector<int> aFixedWidths { mnCheckWidthReq }; // tdf#134038 insert in the fastest order, this might be backwards so only do it for // the !mbHasDates case where no entry depends on another to exist before getting // inserted. We cannot retain pre-existing treeview content, only clear and fill it. @@ -1188,7 +1189,7 @@ size_t ScCheckListMenuControl::initMembers() insertMember(*mxChecks, rIter, maMembers[i]); if (maMembers[i].mbVisible) ++nVisMemCount; - }); + }, mnCheckWidthReq != -1 ? &aFixedWidths : nullptr); } else { |