diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-12-16 01:47:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-12-16 01:47:39 +0300 |
commit | abee7cd42ffa9c4fe6e789f6ceb98d7b695f8c72 (patch) | |
tree | 6e6841d6b8d0d25fbfad1de753f0a01cb96fce30 /src/gui/windows/skilldialog.cpp | |
parent | ddfa72d8d01dacdcd38c159ea8dc024fe9d5562a (diff) | |
download | mv-abee7cd42ffa9c4fe6e789f6ceb98d7b695f8c72.tar.gz mv-abee7cd42ffa9c4fe6e789f6ceb98d7b695f8c72.tar.bz2 mv-abee7cd42ffa9c4fe6e789f6ceb98d7b695f8c72.tar.xz mv-abee7cd42ffa9c4fe6e789f6ceb98d7b695f8c72.zip |
Fix hiding tabs in skill dialog.
Diffstat (limited to 'src/gui/windows/skilldialog.cpp')
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index a18ab3b3e..d273d8453 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -145,7 +145,10 @@ void SkillDialog::addDefaultTab() // TRANSLATORS: unknown skills tab name mDefaultTab = new SkillTab(this, _("Unknown"), listbox); mDeleteTabs.push_back(mDefaultTab); + mDefaultTab->setVisible(Visible_false); mTabs->addTab(mDefaultTab, scroll); + mTabs->adjustTabPositions(); + mTabs->setSelectedTabDefault(); } void SkillDialog::action(const ActionEvent &event) @@ -403,11 +406,11 @@ void SkillDialog::loadXmlFile(const std::string &fileName, mDefaultTab = tab; } + mDeleteTabs.push_back(tab); if (alwaysVisible == true) tab->setVisible(Visible_true); else tab->setVisible(Visible_false); - mDeleteTabs.push_back(tab); mTabs->addTab(tab, scroll); for_each_xml_child_node(node, set) @@ -602,7 +605,11 @@ bool SkillDialog::updateSkill(const int id, info->sp = sp; info->update(); if (info->tab) + { info->tab->setVisible(Visible_true); + mTabs->adjustTabPositions(); + mTabs->setSelectedTabDefault(); + } } return true; } @@ -655,6 +662,8 @@ void SkillDialog::addSkill(const SkillOwner::Type owner, skill->tab = mDefaultTab; mDefaultModel->addSkill(skill); mDefaultTab->setVisible(Visible_true); + mTabs->adjustTabPositions(); + mTabs->setSelectedTabDefault(); mSkills[id] = skill; mDefaultModel->updateVisibilities(); |