From 1e5ef5ad665721a4c7824a1c8c0fb48ed7e4dc51 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 21 Oct 2012 17:01:21 +0300 Subject: Fix item selection in shoplistbox class. --- src/gui/widgets/shoplistbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp index b9d7e18f4..0134a64c9 100644 --- a/src/gui/widgets/shoplistbox.cpp +++ b/src/gui/widgets/shoplistbox.cpp @@ -180,7 +180,7 @@ void ShopListBox::mouseMoved(gcn::MouseEvent &event) return; } - const int index = event.getY() / mRowHeight; + const int index = (event.getY() + mPadding) / mRowHeight; if (index < 0 || index >= mShopItems->getNumberOfElements()) { -- cgit v1.2.3-70-g09d2