aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/gradient_edit.cpp
diff options
context:
space:
mode:
authorJFonS2018-02-12 22:22:45 +0100
committerHein-Pieter van Braam2018-03-28 22:01:19 +0200
commita026e2626ca21a6b9ab0d88f73053fe47b21b830 (patch)
tree0452f7d67538156ec4a690af89135c5a06f3fa73 /scene/gui/gradient_edit.cpp
parentcf2e30b30c2daff4366984d73dc0339b6e259a73 (diff)
downloadgodot-a026e2626ca21a6b9ab0d88f73053fe47b21b830.tar.gz
godot-a026e2626ca21a6b9ab0d88f73053fe47b21b830.tar.zst
godot-a026e2626ca21a6b9ab0d88f73053fe47b21b830.zip
Fix weird editor crash when switching from editing one gradient to another keeps 'grabbing' variable to true
(cherry picked from commit f68594a5251814e950a6f22ecce09333f44274d6)
Diffstat (limited to '')
-rw-r--r--scene/gui/gradient_edit.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp
index 398503971..9fc8e98a7 100644
--- a/scene/gui/gradient_edit.cpp
+++ b/scene/gui/gradient_edit.cpp
@@ -367,6 +367,13 @@ void GradientEdit::_notification(int p_what) {
draw_line(Vector2(-1, -1), Vector2(-1, h + 1), Color(1, 1, 1, 0.6));
}
}
+
+ if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
+
+ if (!is_visible()) {
+ grabbing = false;
+ }
+ }
}
void GradientEdit::_draw_checker(int x, int y, int w, int h) {