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 | |
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.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/gui/shoplistbox.cpp | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2007-12-21 Bjørn Lindeijer <bjorn@lindeijer.nl> + + * src/gui/shoplistbox.cpp: Fixed shop list box not to scroll up when + the selection is removed. + 2007-12-19 Philipp Sehmisch <tmw@crushnet.org> * data/maps/new_18-1.tmx: Fixed a map bug (monster trap) on 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); } |