summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/skilldialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index d7b3153dd..08a98db66 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -167,10 +167,10 @@ class SkillListBox final : public ListBox
if (!viewport)
return;
- const int y = event.getY() / getRowHeight();
+ const int y = (event.getY() + mPadding) / getRowHeight();
if (!mModel || y >= mModel->getNumberOfElements())
return;
- const SkillInfo *const skill = mModel->getSkillAt(y + mPadding);
+ const SkillInfo *const skill = mModel->getSkillAt(y);
if (!skill)
return;