summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-14 19:46:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-16 10:31:46 +0100
commit01ffc179461d6c53371855ba5894eb7f26fa4e8c (patch)
tree09b0339ed71f41ae0003a75d47afbd97f54d16a6
parent7046830506bd51db897289bf59f48342015ad7df (diff)
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.stahl@allotropia.de> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx8
1 files changed, 4 insertions, 4 deletions
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);
}
}