diff options
Diffstat (limited to 'src/gui/statuswindow.cpp')
-rw-r--r-- | src/gui/statuswindow.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp index 493f5ee6..6535edf7 100644 --- a/src/gui/statuswindow.cpp +++ b/src/gui/statuswindow.cpp @@ -238,10 +238,7 @@ void StatusWindow::event(const std::string &channel, const Mana::Event &event) _("Character points: %d"), event.getInt("newValue"))); mCharacterPointsLabel->adjustSize(); - // Update all attributes - for (Attrs::iterator it = mAttrs.begin(); - it != mAttrs.end(); it++) - it->second->update(); + updateAttrs(); break; case CORR_POINTS: @@ -249,10 +246,7 @@ void StatusWindow::event(const std::string &channel, const Mana::Event &event) _("Correction points: %d"), event.getInt("newValue"))); mCorrectionPointsLabel->adjustSize(); - // Update all attributes - for (Attrs::iterator it = mAttrs.begin(); - it != mAttrs.end(); it++) - it->second->update(); + updateAttrs(); break; case LEVEL: @@ -286,6 +280,14 @@ void StatusWindow::event(const std::string &channel, const Mana::Event &event) } } +void StatusWindow::updateAttrs() +{ + for (Attrs::iterator it = mAttrs.begin(); it != mAttrs.end(); it++) + { + it->second->update(); + } +} + void StatusWindow::setPointsNeeded(int id, int needed) { Attrs::iterator it = mAttrs.find(id); |