From fb9ff00640bc0fcdd5973b28dd6971bba68403d9 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Wed, 25 Sep 2019 18:56:59 +0200 Subject: [PATCH] Reset hovered point in Curve when deleted to avoid errors on draw Fixes #32344 --- editor/plugins/curve_editor_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index c2b6031e60b..b340a8c857f 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -456,6 +456,9 @@ void CurveEditor::remove_point(int index) { if (index == _selected_point) set_selected_point(-1); + if (index == _hover_point) + set_hover_point_index(-1); + ur.commit_action(); }