summaryrefslogtreecommitdiff
path: root/src/gui/skilldialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-05-25 02:51:51 +0300
committerAndrei Karas <akaras@inbox.ru>2011-05-25 02:51:51 +0300
commit8d80b897b5863372649de9b5f3c8d7234ae47f58 (patch)
treea109bb1adeee89489113a4637ecd197dae403018 /src/gui/skilldialog.cpp
parent1f4032b8de527da72ef4b89371c077eea644fdf2 (diff)
downloadmanaverse-8d80b897b5863372649de9b5f3c8d7234ae47f58.tar.gz
manaverse-8d80b897b5863372649de9b5f3c8d7234ae47f58.tar.bz2
manaverse-8d80b897b5863372649de9b5f3c8d7234ae47f58.tar.xz
manaverse-8d80b897b5863372649de9b5f3c8d7234ae47f58.zip
Fix some memory leaks in being, debugwindow, shortcutwindow, skilldialog, map classes.
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();