summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabbedarea.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-06 10:38:07 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-06 10:38:07 +0100
commit7cbdab589491e007adacd7597c769cdb9308a32c (patch)
tree0269c37cccbed49a1cb15db9de816f39ef549189 /src/gui/widgets/tabbedarea.cpp
parent616afb27c23def5661b3466d6fc86fd1c65c0082 (diff)
parentaa4229cbb9f2b264ca96c3beedc66b1c79ccc1f5 (diff)
downloadmana-7cbdab589491e007adacd7597c769cdb9308a32c.tar.gz
mana-7cbdab589491e007adacd7597c769cdb9308a32c.tar.bz2
mana-7cbdab589491e007adacd7597c769cdb9308a32c.tar.xz
mana-7cbdab589491e007adacd7597c769cdb9308a32c.zip
Merge branch 'aethyra/master'
Conflicts: src/being.cpp src/being.h src/floor_item.cpp src/floor_item.h src/flooritemmanager.cpp src/gui/inventorywindow.cpp src/gui/inventorywindow.h src/gui/itemcontainer.cpp src/gui/popupmenu.cpp src/net/beinghandler.cpp src/npc.cpp
Diffstat (limited to 'src/gui/widgets/tabbedarea.cpp')
-rw-r--r--src/gui/widgets/tabbedarea.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index ce11fe69..a8f2b6f0 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -40,9 +40,8 @@ Tab* TabbedArea::getTab(const std::string &name)
while (itr != itr_end)
{
if ((*itr).first->getCaption() == name)
- {
return static_cast<Tab*>((*itr).first);
- }
+
++itr;
}
return NULL;
@@ -51,9 +50,7 @@ Tab* TabbedArea::getTab(const std::string &name)
void TabbedArea::draw(gcn::Graphics *graphics)
{
if (mTabs.empty())
- {
return;
- }
drawChildren(graphics);
}
@@ -64,9 +61,8 @@ gcn::Widget* TabbedArea::getWidget(const std::string &name)
while (itr != itr_end)
{
if ((*itr).first->getCaption() == name)
- {
return (*itr).second;
- }
+
++itr;
}
@@ -91,9 +87,7 @@ void TabbedArea::addTab(Tab *tab, gcn::Widget *widget)
mTabs.push_back(std::pair<Tab*, gcn::Widget*>(tab, widget));
if (!mSelectedTab)
- {
setSelectedTab(tab);
- }
adjustTabPositions();
adjustSize();
@@ -107,15 +101,10 @@ void TabbedArea::removeTab(Tab *tab)
{
int index = getSelectedTabIndex();
- if (index == (int)mTabs.size() - 1
- && mTabs.size() == 1)
- {
+ if (index == (int)mTabs.size() - 1 && mTabs.size() == 1)
tabIndexToBeSelected = -1;
- }
else
- {
tabIndexToBeSelected = index - 1;
- }
}
TabContainer::iterator iter;