浏览代码

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();
 		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();
 		Point2 p = Vector2(p_event.mouse_button.x,p_event.mouse_button.y)/get_size();
 		p.y=1.0-p.y;
 		p.y=1.0-p.y;