chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 01ffc179461d6c53371855ba5894eb7f26fa4e8c Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Nov 14 19:46:47 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Nov 16 10:31:46 2021 +0100 Resolves: tdf#145663 nL is the index of the light to set to the model don't reuse the variable in another loop before its finally set to the model Change-Id: I336d8c0f3ce612448dd639e939e65fb434da1513 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125132 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index c4b28162d08c..9991c5e6b4cc 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -434,20 +434,20 @@ IMPL_LINK(ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl, weld::But bool bIsChecked = pInfo->pButton->get_prev_active(); ControllerLockGuardUNO aGuard( m_xChartModel ); - for( nL=0; nL<8; nL++) + for (sal_Int32 i = 0; i < 8; ++i) { - LightButton* pLightButton = m_pLightSourceInfoList[nL].pButton; + LightButton* pLightButton = m_pLightSourceInfoList[i].pButton; if (pLightButton == pButton) { pLightButton->set_active(true); if (!pLightButton->get_widget()->has_focus()) pLightButton->get_widget()->grab_focus(); - m_pLightSourceInfoList[nL].pButton->set_prev_active(true); + m_pLightSourceInfoList[i].pButton->set_prev_active(true); } else { pLightButton->set_active(false); - m_pLightSourceInfoList[nL].pButton->set_prev_active(false); + m_pLightSourceInfoList[i].pButton->set_prev_active(false); } }