summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorPouleyKetchoupp <pouleyketchoup@gmail.com>2019-09-25 18:56:59 +0200
committerPouleyKetchoupp <pouleyketchoup@gmail.com>2019-09-25 18:58:09 +0200
commitfb9ff00640bc0fcdd5973b28dd6971bba68403d9 (patch)
treef18a976dc4b0c0b7c53485bdda48086eedc4d1cc /editor/plugins
parent0ea54eeb0672c405d7ad0edf8444f0d86158f8b6 (diff)
Reset hovered point in Curve when deleted to avoid errors on draw
Fixes #32344
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/curve_editor_plugin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index c2b6031e60..b340a8c857 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();
}