Fix EditorPropertyEasing capturing drag events originated outside of it

(cherry picked from commit 31db95b048)
This commit is contained in:
Yuri Sizov 2021-05-12 12:39:43 +03:00 committed by Rémi Verschelde
parent 746b9b03dd
commit 57f271f03a
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -981,8 +981,7 @@ void EditorPropertyEasing::_drag_easing(const Ref<InputEvent> &p_ev) {
const Ref<InputEventMouseMotion> mm = p_ev; const Ref<InputEventMouseMotion> mm = p_ev;
if (mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_LEFT) { if (dragging && mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_LEFT) {
float rel = mm->get_relative().x; float rel = mm->get_relative().x;
if (rel == 0) if (rel == 0)
return; return;