Pārlūkot izejas kodu

Fixed crash when trying to add keypoints and deleting them while holding mouse button down.

mostafahassan 10 gadi atpakaļ
vecāks
revīzija
78d734873d
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      tools/editor/plugins/shader_graph_editor_plugin.cpp

+ 1 - 1
tools/editor/plugins/shader_graph_editor_plugin.cpp

@@ -376,7 +376,7 @@ void GraphCurveMapEdit::_input_event(const InputEvent& p_event) {
 		update();
 	}
 
-	if (p_event.type==InputEvent::MOUSE_MOTION && grabbing) {
+	if (p_event.type==InputEvent::MOUSE_MOTION && grabbing  && grabbed != -1) {
 
 		Point2 p = Vector2(p_event.mouse_button.x,p_event.mouse_button.y)/get_size();
 		p.y=1.0-p.y;