summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-19 21:23:52 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-19 21:23:52 +0300
commit99d68089180167c0ed23bf167ef57eb551114b45 (patch)
tree840ce77c4a1a8d7f6d73d02accc00ef07f6af00a
parent66dadb1212115f4b11e5d3c0857b5a25bd6399ee (diff)
downloadManaVerse-99d68089180167c0ed23bf167ef57eb551114b45.tar.gz
ManaVerse-99d68089180167c0ed23bf167ef57eb551114b45.tar.bz2
ManaVerse-99d68089180167c0ed23bf167ef57eb551114b45.tar.xz
ManaVerse-99d68089180167c0ed23bf167ef57eb551114b45.zip
Update skill popup if any skill was changed.
-rw-r--r--src/gui/popups/skillpopup.cpp6
-rw-r--r--src/gui/popups/skillpopup.h2
-rw-r--r--src/gui/windows/skilldialog.cpp4
3 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/popups/skillpopup.cpp b/src/gui/popups/skillpopup.cpp
index efd9e1f50..f6e1f19a7 100644
--- a/src/gui/popups/skillpopup.cpp
+++ b/src/gui/popups/skillpopup.cpp
@@ -179,3 +179,9 @@ void SkillPopup::mouseMoved(MouseEvent &event)
setVisible(Visible_false);
mLastId = 0;
}
+
+void SkillPopup::reset()
+{
+ mLastId = 0;
+ mLastLevel = 0;
+}
diff --git a/src/gui/popups/skillpopup.h b/src/gui/popups/skillpopup.h
index ab170002f..33d6d50cc 100644
--- a/src/gui/popups/skillpopup.h
+++ b/src/gui/popups/skillpopup.h
@@ -59,6 +59,8 @@ class SkillPopup final : public Popup
void mouseMoved(MouseEvent &event) override final;
+ void reset();
+
private:
Label *mSkillName A_NONNULLPOINTER;
TextBox *mSkillDesc A_NONNULLPOINTER;
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 7a34ab4f7..14a00c678 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -31,6 +31,8 @@
#include "const/resources/spriteaction.h"
+#include "gui/popups/skillpopup.h"
+
#include "gui/shortcut/itemshortcut.h"
#include "gui/windows/setupwindow.h"
@@ -215,6 +217,8 @@ void SkillDialog::update()
if (info && info->modifiable == Modifiable_true)
info->update();
}
+
+ skillPopup->reset();
}
void SkillDialog::updateModels()