SIL.FieldWorks.Discourse.ConstChartBody.SelectAndScrollToBookmark C# (CSharp) Method

SelectAndScrollToBookmark() private method

Selects and scrolls to the bookmarked location in the constituent chart.
private SelectAndScrollToBookmark ( InterAreaBookmark bookmark ) : void
bookmark SIL.FieldWorks.IText.InterAreaBookmark
return void
		internal void SelectAndScrollToBookmark(InterAreaBookmark bookmark)
		{
			CheckDisposed();

			Debug.Assert(bookmark != null);
			Debug.Assert(bookmark.IndexOfParagraph >= 0);

			if (m_chart == null || m_logic.Chart.RowsOS.Count < 1)
				return; // nothing to do (and leave the bookmark alone)

			// Gets the wordform that is closest to the bookmark in the text
			var occurrence = m_logic.FindWordformAtBookmark(bookmark);
			SelectAndScrollToAnalysisOccurrence(occurrence);
		}