diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-12-21 11:56:23 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-12-21 11:56:23 +0000 |
commit | 85361ea254cc764c31bfcf6b4cc1fb90cda48a85 (patch) | |
tree | 730f769f0923f2a0cb6221486edcced157544a84 /src/gui | |
parent | 91d7155da96cf0592b53f728ae02ac14c324e9f3 (diff) | |
download | mana-85361ea254cc764c31bfcf6b4cc1fb90cda48a85.tar.gz mana-85361ea254cc764c31bfcf6b4cc1fb90cda48a85.tar.bz2 mana-85361ea254cc764c31bfcf6b4cc1fb90cda48a85.tar.xz mana-85361ea254cc764c31bfcf6b4cc1fb90cda48a85.zip |
Fixed shop list box not to scroll up when the selection is removed.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/shoplistbox.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp index 610ad76c..4c590e66 100644 --- a/src/gui/shoplistbox.cpp +++ b/src/gui/shoplistbox.cpp @@ -114,10 +114,10 @@ void ShopListBox::setSelected(int selected) std::max(-1, selected)); gcn::Widget *parent = getParent(); - if (parent) + if (parent && mSelected >= 0) { gcn::Rectangle scroll; - scroll.y = (mSelected < 0) ? 0 : mRowHeight * mSelected; + scroll.y = mRowHeight * mSelected; scroll.height = mRowHeight; parent->showWidgetPart(this, scroll); } |