diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-02-27 11:38:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-27 11:38:19 +0100 |
commit | 6093660bfb50c76ca9e1bda74bc80e118f44b7a4 (patch) | |
tree | 33b9c698deb56f8f2ec39f71b11e270f170e76ac | |
parent | a6d4438faba3eb23fd526d477c37732ced37047e (diff) | |
parent | f68594a5251814e950a6f22ecce09333f44274d6 (diff) |
Merge pull request #16656 from JFonS/fix_gradient_crash
Fix weird editor crash when switching from editing one gradient to another keeps 'grabbing' variable to true
-rw-r--r-- | scene/gui/gradient_edit.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp index 3985039716..9fc8e98a7f 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) { |