summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorGilles Roudiere <gilles.roudiere@gmail.com>2017-10-20 11:48:57 +0200
committerGitHub <noreply@github.com>2017-10-20 11:48:57 +0200
commit5e348e72c1c82ec99dee10767dddb40d30b01999 (patch)
tree3b15699449036c46cef6e77ae268f818ece92528 /scene/gui
parent3971bd41bb274c7f999801d74863746cd4546128 (diff)
parent807a84f7c9aac49d2fd1f9c46693e0918f99c553 (diff)
Merge pull request #12159 from RandomShaper/fix-sticky-slider
Reset slider mouse state on hiding/removing
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/slider.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp
index 116e0ac354..e88742a3e3 100644
--- a/scene/gui/slider.cpp
+++ b/scene/gui/slider.cpp
@@ -157,6 +157,12 @@ void Slider::_notification(int p_what) {
mouse_inside = false;
update();
} break;
+ case NOTIFICATION_VISIBILITY_CHANGED: // fallthrough
+ case NOTIFICATION_EXIT_TREE: {
+
+ mouse_inside = false;
+ grab.active = false;
+ } break;
case NOTIFICATION_DRAW: {
RID ci = get_canvas_item();
Size2i size = get_size();