sw/source/ui/fldui/flddinf.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 8e9a963d20edcf5751705bb64126f51a2ace6b18 Author: Justin Luth <justin_l...@sil.org> AuthorDate: Tue Apr 12 15:53:58 2022 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Apr 20 11:02:34 2022 +0200 tdf#148380 sw fieldui: always allow turning off "Fixed Content" As we add more and more MS fields as fixed, some of them are set so the UI to manage that flag is disabled. While it doesn't necessarily make much sense to allow a user to SET these fields as fixed (so don't ALWAYS enable that flag), at least allow it to be turned off if it somehow did get enabled. Change-Id: I331c871fa7a3e40a7a0154ab4d7d68c67d9c1dad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133086 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index 50ce0548fd54..c96cfbc0c575 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -359,9 +359,12 @@ IMPL_LINK_NOARG(SwFieldDokInfPage, SubTypeHdl, weld::TreeView&, void) } } - m_xFormat->set_sensitive(bEnable); + // Always allow Fixed Content to be turned off if it is currently on + m_xFormat->set_sensitive(bEnable || m_xFixedCB->get_active()); - if (bEnable && m_xFormatLB->get_selected_index() == -1) + if (!bEnable) + m_xFormatLB->clear(); + else if (m_xFormatLB->get_selected_index() == -1) m_xFormatLB->select(0); }