tdf#151316 recalc what dependencies should be sensitive

Change-Id: I40f78ec151c3d5901209b8587f6152ab76d04e88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140976
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara 2022-10-05 09:49:17 +01:00
parent 837d52dbc2
commit 384167ab85

View file

@ -458,15 +458,18 @@ IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, weld::MetricSpinButton&, rField, v
IMPL_LINK(SwTextGridPage, GridTypeHdl, weld::Toggleable&, rButton, void)
{
bool bEnable = m_xNoGridRB.get() != &rButton;
m_xLayoutFL->set_sensitive(bEnable);
m_xDisplayFL->set_sensitive(bEnable);
if (!rButton.get_active())
return;
const bool bNoGrid = m_xNoGridRB.get() == &rButton;
m_xLayoutFL->set_sensitive(!bNoGrid);
m_xDisplayFL->set_sensitive(!bNoGrid);
//one special case
if (bEnable)
if (!bNoGrid)
DisplayGridHdl(*m_xDisplayCB);
bEnable = m_xCharsGridRB.get() == &rButton;
bool bEnable = m_xCharsGridRB.get() == &rButton;
m_xSnapToCharsCB->set_sensitive(bEnable);
bEnable = m_xLinesGridRB.get() == &rButton;
@ -479,6 +482,10 @@ IMPL_LINK(SwTextGridPage, GridTypeHdl, weld::Toggleable&, rButton, void)
m_xCharWidthMF->set_sensitive(false);
}
//recalc which dependencies are sensitive
if (!bNoGrid)
TextSizeChangedHdl(*m_xTextSizeMF);
GridModifyHdl();
}