public void CenterOnMethod(MethodItem method) { // TODO: center the given method on the screen editor.SetCursorPosition(method.Model.startLine - 1, 0); editor.EnsureCursorVisible(); editor.MoveCursor(QTextEdit.CursorAction.MoveUp, false); }