summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()