diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-02-13 22:12:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-13 22:12:48 +0100 |
commit | e8763ef1306b0d87df742cfc0636ea75f4a12bce (patch) | |
tree | 42886e349ab312f4422d3732ae4ad19d28caebc5 | |
parent | 9f0cce840d9752535c2377b3004fadb78174e455 (diff) | |
parent | 4d92c5e1c306b483d30004fe04fbef1ad46f7f7f (diff) |
Merge pull request #16518 from Paulb23/fix_members_overview_offset
Fixed members overview not scrolling to correct line
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 5befbbae8d..d7331d4f77 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1332,11 +1332,12 @@ void ScriptEditor::_members_overview_selected(int p_idx) { if (!se) { return; } - // Go to the member's line and reset the cursor column. We can't just change scroll_position - // directly, since code might be folded. + // Go to the member's line and reset the cursor column. We can't change scroll_position + // directly until we have gone to the line first, since code might be folded. se->goto_line(members_overview->get_item_metadata(p_idx)); Dictionary state = se->get_edit_state(); state["column"] = 0; + state["scroll_position"] = members_overview->get_item_metadata(p_idx); se->set_edit_state(state); } |