Merge pull request #60016 from SirQuartz/master
This commit is contained in:
commit
efe0a7e44d
1 changed files with 1 additions and 1 deletions
|
|
@ -2727,7 +2727,7 @@ void VisualScriptEditor::_center_on_node(int p_id) {
|
|||
|
||||
if (gn) {
|
||||
gn->set_selected(true);
|
||||
Vector2 new_scroll = gn->get_position_offset() - graph->get_size() * 0.5 + gn->get_size() * 0.5;
|
||||
Vector2 new_scroll = gn->get_position_offset() * graph->get_zoom() - graph->get_size() * 0.5 + gn->get_size() * 0.5;
|
||||
graph->set_scroll_ofs(new_scroll);
|
||||
script->set_scroll(new_scroll / EDSCALE);
|
||||
script->set_edited(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue