From 80b0caa35e4b84b745daef7e4102b428539cdee5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 May 2015 20:12:20 +0300 Subject: Remove safeDraw implimentation from Widget. --- src/gui/widgets/tabbedarea.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/gui/widgets/tabbedarea.cpp') 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(); -- cgit v1.2.3-60-g2f50