summaryrefslogtreecommitdiff
path: root/scene/gui/slider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/slider.cpp')
-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();