Merge pull request #16518 from Paulb23/fix_members_overview_offset

Fixed members overview not scrolling to correct line
This commit is contained in:
Rémi Verschelde 2018-02-13 22:12:48 +01:00 committed by GitHub
commit e8763ef130
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1332,11 +1332,12 @@ void ScriptEditor::_members_overview_selected(int p_idx) {
if (!se) { if (!se) {
return; return;
} }
// Go to the member's line and reset the cursor column. We can't just change scroll_position // Go to the member's line and reset the cursor column. We can't change scroll_position
// directly, since code might be folded. // directly until we have gone to the line first, since code might be folded.
se->goto_line(members_overview->get_item_metadata(p_idx)); se->goto_line(members_overview->get_item_metadata(p_idx));
Dictionary state = se->get_edit_state(); Dictionary state = se->get_edit_state();
state["column"] = 0; state["column"] = 0;
state["scroll_position"] = members_overview->get_item_metadata(p_idx);
se->set_edit_state(state); se->set_edit_state(state);
} }