소스 검색

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

mostafahassan 10 년 전
부모
커밋
78d734873d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;