tdf#151316 recalc what dependencies should be sensitive
Change-Id: I40f78ec151c3d5901209b8587f6152ab76d04e88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140960
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit 159a117c2e6d7fe768c9f76be0bc9f792ace96eb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140962
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 7f9b10cd..db3ade6 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -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();
}