diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-20 22:09:51 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-20 22:09:51 +0200 |
commit | 19bbe4c517d996b2f7364dd2baf3fd4b19edf697 (patch) | |
tree | 117a2f16dbdeb6c65ba6f8e9f478b4302927884d /src | |
parent | 654cc39c7750bd7a8d798ab5c4732ed960135573 (diff) | |
download | mana-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')
-rw-r--r-- | src/gui/widgets/listbox.cpp | 30 | ||||
-rw-r--r-- | src/gui/widgets/listbox.h | 9 |
2 files changed, 0 insertions, 39 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) { diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h index cfb58f15..a92d8bbf 100644 --- a/src/gui/widgets/listbox.h +++ b/src/gui/widgets/listbox.h @@ -58,15 +58,6 @@ class ListBox : public gcn::ListBox void mouseDragged(gcn::MouseEvent &event); - /** - * Sets the selected item. The selected item is represented by - * an index from the list model. - * - * @param selected the selected item as an index from the list model. - * @see getSelected - */ - void setSelected(int selected); - private: static float mAlpha; }; |