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
This commit is contained in:
Rémi Verschelde 2018-02-27 11:38:19 +01:00 committed by GitHub
commit 6093660bfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {