summaryrefslogtreecommitdiff
path: root/src/gui/widgets/sliderlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/sliderlist.cpp')
-rw-r--r--src/gui/widgets/sliderlist.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/sliderlist.cpp b/src/gui/widgets/sliderlist.cpp
index 55cda4d26..70734b707 100644
--- a/src/gui/widgets/sliderlist.cpp
+++ b/src/gui/widgets/sliderlist.cpp
@@ -145,13 +145,14 @@ void SliderList::action(const gcn::ActionEvent &event)
if (!mListModel)
return;
- if (event.getId() == mPrevEventId)
+ const std::string &eventId = event.getId();
+ if (eventId == mPrevEventId)
{
mSelectedIndex --;
if (mSelectedIndex < 0)
mSelectedIndex = mListModel->getNumberOfElements() - 1;
}
- else if (event.getId() == mNextEventId)
+ else if (eventId == mNextEventId)
{
mSelectedIndex ++;
if (mSelectedIndex >= mListModel->getNumberOfElements())