diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-05-03 22:14:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-05-03 22:15:26 +0300 |
commit | 1415b89614adca023caafd98a66adee716bc9299 (patch) | |
tree | 6cc0ee8c055a68a937e3e5914cc8a0bc2832c730 /src/gui/windows/skilldialog.cpp | |
parent | 7cf462cbf7b6c5eb21326d4d62cba7ddf8dea5a0 (diff) | |
download | manaverse-1415b89614adca023caafd98a66adee716bc9299.tar.gz manaverse-1415b89614adca023caafd98a66adee716bc9299.tar.bz2 manaverse-1415b89614adca023caafd98a66adee716bc9299.tar.xz manaverse-1415b89614adca023caafd98a66adee716bc9299.zip |
Fix hiding deleted skills from skill info list without delete packet.s20180503
This can happend with temporary skills.
Diffstat (limited to 'src/gui/windows/skilldialog.cpp')
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index 8ded2a001..e60465367 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -302,6 +302,31 @@ void SkillDialog::updateModels() } } +void SkillDialog::updateModelsHidden() +{ + std::set<SkillModel*> models; + + FOR_EACH (SkillMap::const_iterator, it, mSkills) + { + SkillInfo *const info = (*it).second; + if (info != nullptr) + { + if (info->visible == Visible_false) + { + SkillModel *const model = info->model; + if (model != nullptr) + models.insert(model); + } + } + } + FOR_EACH (std::set<SkillModel*>::iterator, it, models) + { + SkillModel *const model = *it; + if (model != nullptr) + model->updateVisibilities(); + } +} + void SkillDialog::clearSkills() { mTabs->removeAll(true); |