From 7960d5a9a700a2af47903b3aa1ca5fb3776af48f Mon Sep 17 00:00:00 2001 From: Mitchell Schwitzer Date: Sun, 12 Mar 2017 16:44:56 -0700 Subject: [PATCH] fix skill progress bar v2 both widgets display their own progess indicator. it was being set for value (when you hovered over the level of your skill, eg the "5" in "Acrobatics 5"), but not for the name. this fixes that, but the progress information is being stored/displayed by two different widgets for one skill --- apps/openmw/mwgui/statswindow.cpp | 4 +++- apps/openmw/mwmechanics/mechanicsmanagerimp.cpp | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwgui/statswindow.cpp b/apps/openmw/mwgui/statswindow.cpp index cee015da0..a47a6710b 100644 --- a/apps/openmw/mwgui/statswindow.cpp +++ b/apps/openmw/mwgui/statswindow.cpp @@ -237,8 +237,10 @@ namespace MWGui nameWidget->setSize(nameWidget->getWidth() - (widthAfter-widthBefore), nameWidget->getHeight()); } - if (value.getBase() < 100) + if (value.getBase() < 100) { + setSkillProgress(nameWidget, value.getProgress(), parSkill); setSkillProgress(valueWidget, value.getProgress(), parSkill); + } } } diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index e5b9e8fcf..ca5d40b4a 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -338,19 +338,16 @@ namespace MWMechanics } } - bool updateSkills = false; //Loop over ESM::Skill::SkillEnum for(int i = 0; i < ESM::Skill::Length; ++i) { if(stats.getSkill(i) != mWatchedSkills[i] || mWatchedStatsEmpty) { - updateSkills = true; mWatchedSkills[i] = stats.getSkill(i); winMgr->setValue((ESM::Skill::SkillEnum)i, stats.getSkill(i)); } } - if (updateSkills) { winMgr->updateSkillArea(); } winMgr->setValue("level", stats.getLevel()); mWatchedStatsEmpty = false;