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.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 5e3af38d4..25fc3b8f2 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -610,7 +610,7 @@ gcn::Widget *TabbedArea::getWidgetByIndex(const int index) const
return mTabs[index].second;
}
-void TabbedArea::removeAll()
+void TabbedArea::removeAll(bool del)
{
if (getSelectedTabIndex() != -1)
{
@@ -622,8 +622,11 @@ void TabbedArea::removeAll()
Tab *tab = mTabs[idx].first;
gcn::Widget *widget = mTabs[idx].second;
removeTab(tab);
- delete tab;
- delete widget;
+ if (del)
+ {
+ delete tab;
+ delete widget;
+ }
}
}