summaryrefslogtreecommitdiffstats
path: root/chart2/source
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-15 16:17:55 +0100
commitc2cdae9c87cead2a7901b0c173a9561e24162678 (patch)
tree600b11e76554e2d638e702ed04f589953658164d /chart2/source
parentgtk4: implement CreateChildFrame (diff)
downloadcore-c2cdae9c87cead2a7901b0c173a9561e24162678.tar.gz
core-c2cdae9c87cead2a7901b0c173a9561e24162678.zip
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/+/125208 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2/source')
-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 878f3fa0b204..74c2de00b5b9 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -433,20 +433,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);
}
}