소스 검색

Merge pull request #51497 from Chaosus/vs_fix_addnode_zoomed

Fix incorrect position of the created VisualShader nodes on zoomed graph
Rémi Verschelde 4 년 전
부모
커밋
e81427e959
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      editor/plugins/visual_shader_editor_plugin.cpp

+ 1 - 0
editor/plugins/visual_shader_editor_plugin.cpp

@@ -2361,6 +2361,7 @@ void VisualShaderEditor::_add_node(int p_idx, int p_op_idx, String p_resource_pa
 		position += graph->get_size() * 0.5;
 		position /= EDSCALE;
 	}
+	position /= graph->get_zoom();
 	saved_node_pos_dirty = false;
 
 	int id_to_use = visual_shader->get_valid_node_id(type);