summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-21 14:27:21 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-21 14:27:21 +0300
commit8048bed1e902feba8c623f68badbba946b0a24ac (patch)
tree5c5c6150f21dc4ee4342563a071f1e4010397d35
parent59e4495082d3911d9adae6d7ed66586279e45e84 (diff)
downloadmv-8048bed1e902feba8c623f68badbba946b0a24ac.tar.gz
mv-8048bed1e902feba8c623f68badbba946b0a24ac.tar.bz2
mv-8048bed1e902feba8c623f68badbba946b0a24ac.tar.xz
mv-8048bed1e902feba8c623f68badbba946b0a24ac.zip
Fix selection in skills dialog.
Was broken after adding additinal theming to listboxes.
-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;