Browse Source

Merge pull request #48665 from pycbouh/editor-capture-easing-drag

Fix `EditorPropertyEasing` capturing drag events originated outside of it
Rémi Verschelde 4 years ago
parent
commit
c37fc12615
1 changed files with 1 additions and 1 deletions
  1. 1 1
      editor/editor_properties.cpp

+ 1 - 1
editor/editor_properties.cpp

@@ -951,7 +951,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() & MOUSE_BUTTON_MASK_LEFT) {
+	if (dragging && mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) {
 		float rel = mm->get_relative().x;
 		float rel = mm->get_relative().x;
 		if (rel == 0) {
 		if (rel == 0) {
 			return;
 			return;