diff options
| author | Ovnuniarchos | 2016-01-17 22:26:32 +0100 |
|---|---|---|
| committer | Ovnuniarchos | 2016-01-18 16:02:42 +0100 |
| commit | ded1acc33eab3c50720a286afc852ea14eb0272e (patch) | |
| tree | 30c637d26f714eca139be9cfe2859b7553582d78 /tools/editor/plugins/shader_graph_editor_plugin.cpp | |
| parent | 1469508174aa62ad4a0a0b83c83383ff498a304b (diff) | |
| download | godot-ded1acc33eab3c50720a286afc852ea14eb0272e.tar.gz godot-ded1acc33eab3c50720a286afc852ea14eb0272e.tar.zst godot-ded1acc33eab3c50720a286afc852ea14eb0272e.zip | |
Diffstat (limited to 'tools/editor/plugins/shader_graph_editor_plugin.cpp')
| -rw-r--r-- | tools/editor/plugins/shader_graph_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp index c6677b688..36a8c79b8 100644 --- a/tools/editor/plugins/shader_graph_editor_plugin.cpp +++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp @@ -2658,13 +2658,13 @@ void ShaderGraphEditor::edit(Ref<ShaderGraph> p_shader) { void ShaderGraphEditor::_add_node(int p_type) { ShaderGraph::ShaderType shader_type=ShaderGraph::ShaderType(tabs->get_current_tab()); - graph_edits[shader_type]->add_node(p_type, next_location); } void ShaderGraphEditor::_popup_requested(const Vector2 &p_position) { - next_location = get_local_mouse_pos(); + Vector2 scroll_ofs=graph_edits[tabs->get_current_tab()]->get_graph_edit()->get_scroll_ofs(); + next_location = get_local_mouse_pos() + scroll_ofs; popup->set_global_pos(p_position); popup->set_size( Size2( 200, 0) ); popup->popup(); |
