summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabbedarea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/tabbedarea.cpp')
-rw-r--r--src/gui/widgets/tabbedarea.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 081b61aae..0afa71033 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -189,6 +189,19 @@ void TabbedArea::draw(Graphics *graphics)
BLOCK_END("TabbedArea::draw")
}
+void TabbedArea::safeDraw(Graphics *graphics)
+{
+ BLOCK_START("TabbedArea::draw")
+ if (mTabs.empty())
+ {
+ BLOCK_END("TabbedArea::draw")
+ return;
+ }
+
+ drawChildren(graphics);
+ BLOCK_END("TabbedArea::draw")
+}
+
Widget *TabbedArea::getWidget(const std::string &name) const
{
TabContainer::const_iterator itr = mTabs.begin();