diff options
author | Blue Sans Douze <bluesansdouze@gmail.com> | 2011-03-27 20:18:02 +0200 |
---|---|---|
committer | Blue Sans Douze <bluesansdouze@gmail.com> | 2011-04-02 20:37:42 +0200 |
commit | df7771d05d782789026f01bcbdbcba44028f99aa (patch) | |
tree | bc0b99f81dfebceeb1ddb0420c175839186c2c89 /src/gui/skilldialog.cpp | |
parent | 717ebd24d5419ad79ec215c2d28256268a3fa315 (diff) | |
download | mana-df7771d05d782789026f01bcbdbcba44028f99aa.tar.gz mana-df7771d05d782789026f01bcbdbcba44028f99aa.tar.bz2 mana-df7771d05d782789026f01bcbdbcba44028f99aa.tar.xz mana-df7771d05d782789026f01bcbdbcba44028f99aa.zip |
Fix a bug with SkillDialog which doesn't listen to attributes changed
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r-- | src/gui/skilldialog.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp index be46132e..5b3314d1 100644 --- a/src/gui/skilldialog.cpp +++ b/src/gui/skilldialog.cpp @@ -24,6 +24,7 @@ #include "log.h" #include "playerinfo.h" #include "configuration.h" +#include "listener.h" #include "gui/setup.h" @@ -211,6 +212,8 @@ private: SkillDialog::SkillDialog(): Window(_("Skills")) { + listen(CHANNEL_ATTRIBUTES); + setWindowName("Skills"); setCloseButton(true); setResizable(true); @@ -277,6 +280,17 @@ void SkillDialog::update() } } +void SkillDialog::event(Channels channel, const Mana::Event &event) +{ + if (event.getName() == EVENT_UPDATEATTRIBUTE) + { + if (event.getInt("id") == SKILL_POINTS) + { + update(); + } + } +} + void SkillDialog::loadSkills(const std::string &file) { // Fixes issues with removing tabs |