Преглед на файлове

Merge pull request #16518 from Paulb23/fix_members_overview_offset

Fixed members overview not scrolling to correct line
Rémi Verschelde преди 7 години
родител
ревизия
e8763ef130
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      editor/plugins/script_editor_plugin.cpp

+ 3 - 2
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);
 }