Преглед на файлове

Merge pull request #1591 from MostafaHassan/pr_FixCrashInVisualShader

(Fix crash) in visual shader for curve remap node
Juan Linietsky преди 10 години
родител
ревизия
b1bf4fcef2
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      modules/gdscript/gd_script.cpp
  2. 1 1
      tools/editor/plugins/shader_graph_editor_plugin.cpp

+ 1 - 1
modules/gdscript/gd_script.cpp

@@ -1689,7 +1689,7 @@ bool GDScript::_update_exports() {
 			}
 			}
 
 
 
 
-			if (c->extends_used && String(c->extends_file)!="") {
+			if (c->extends_used && String(c->extends_file)!="" && String(c->extends_file) != get_path()) {
 
 
 				String path = c->extends_file;
 				String path = c->extends_file;
 				if (path.is_rel_path()) {
 				if (path.is_rel_path()) {

+ 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;