diff options
| author | Rémi Verschelde | 2017-12-16 01:16:25 +0100 |
|---|---|---|
| committer | GitHub | 2017-12-16 01:16:25 +0100 |
| commit | 03fb1fd7fa9d9ac92169a5c785458001de789b61 (patch) | |
| tree | f8dff6ea5f19d81c9d3331da74cc24862853a53a /editor/plugins/script_editor_plugin.cpp | |
| parent | 2e21a427ee4a9d596f8b38d0a8e0f71c18dc9c37 (diff) | |
| parent | f139d0e4e65effc658a06c7957d34e93d4eb8b69 (diff) | |
| download | godot-03fb1fd7fa9d9ac92169a5c785458001de789b61.tar.gz godot-03fb1fd7fa9d9ac92169a5c785458001de789b61.tar.zst godot-03fb1fd7fa9d9ac92169a5c785458001de789b61.zip | |
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index d90d3efd6..591e6dac5 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1329,12 +1329,12 @@ void ScriptEditor::_members_overview_selected(int p_idx) { if (!se) { return; } - Dictionary state; - state["scroll_position"] = members_overview->get_item_metadata(p_idx); + // Go to the member's line and reset the cursor column. We can't just change scroll_position + // directly, 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["row"] = members_overview->get_item_metadata(p_idx); se->set_edit_state(state); - se->ensure_focus(); } void ScriptEditor::_help_overview_selected(int p_idx) { |
