summaryrefslogtreecommitdiff
path: root/src/gui/widgets/listbox.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-20 22:09:51 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-20 22:09:51 +0200
commit19bbe4c517d996b2f7364dd2baf3fd4b19edf697 (patch)
tree117a2f16dbdeb6c65ba6f8e9f478b4302927884d /src/gui/widgets/listbox.cpp
parent654cc39c7750bd7a8d798ab5c4732ed960135573 (diff)
downloadmana-19bbe4c517d996b2f7364dd2baf3fd4b19edf697.tar.gz
mana-19bbe4c517d996b2f7364dd2baf3fd4b19edf697.tar.bz2
mana-19bbe4c517d996b2f7364dd2baf3fd4b19edf697.tar.xz
mana-19bbe4c517d996b2f7364dd2baf3fd4b19edf697.zip
Removed the unused setSelected override
It wasn't actually used because it is no longer virtual in the base Guichan class.
Diffstat (limited to 'src/gui/widgets/listbox.cpp')
-rw-r--r--src/gui/widgets/listbox.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index 322ed06d..753e6461 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -66,36 +66,6 @@ void ListBox::draw(gcn::Graphics *graphics)
}
}
-void ListBox::setSelected(int selected)
-{
- if (!mListModel)
- {
- mSelected = -1;
- }
- else
- {
- if (selected < 0 && !mWrappingEnabled)
- {
- mSelected = -1;
- }
- else if (selected >= mListModel->getNumberOfElements() &&
- mWrappingEnabled)
- {
- mSelected = 0;
- }
- else if ((selected >= mListModel->getNumberOfElements() &&
- !mWrappingEnabled) || (selected < 0 && mWrappingEnabled))
- {
- mSelected = mListModel->getNumberOfElements() - 1;
- }
- else
- {
- mSelected = selected;
- }
- }
- gcn::ListBox::setSelected(mSelected);
-}
-
// -- KeyListener notifications
void ListBox::keyPressed(gcn::KeyEvent& keyEvent)
{