summaryrefslogtreecommitdiff
path: root/src/gui/skilldialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r--src/gui/skilldialog.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index 7163d5285..a164d59d7 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -314,21 +314,7 @@ void SkillDialog::update()
void SkillDialog::loadSkills(const std::string &file)
{
- // Fixes issues with removing tabs
- if (mTabs->getSelectedTabIndex() != -1)
- {
- mTabs->setSelectedTab(static_cast<unsigned int>(0));
-
- while (mTabs->getNumberOfTabs() > 0)
- {
- const int idx = mTabs->getNumberOfTabs() - 1;
- Tab *tab = mTabs->getTabByIndex(idx);
- Widget *widget = mTabs->getWidgetByIndex(idx);
- mTabs->removeTab(tab);
- delete tab;
- delete widget;
- }
- }
+ mTabs->removeAll();
delete_all(mSkills);
mSkills.clear();