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

SelectAndScrollToLoc() private method

Selects and scrolls to the bookmarked location in the constituent chart. This version assumes the bookmarked location has been charted, since the location is passed as a parameter.
private SelectAndScrollToLoc ( SIL.FieldWorks.Discourse.ChartLocation chartLoc, bool fbookmark ) : void
chartLoc SIL.FieldWorks.Discourse.ChartLocation A ChartLocation object, created by CCLogic.FindChartLocOfWordform().
fbookmark bool true if called for a bookmark, false if called for ChOrph highlighting
return void
		internal void SelectAndScrollToLoc(ChartLocation chartLoc, bool fbookmark)
		{
			Debug.Assert(m_chart != null);
			Debug.Assert(chartLoc != null);
			Debug.Assert(chartLoc.Row != null);

			if (Height == 0)
			{
				// This doesn't work (because the root box can't be laid out properly) until we have a non-zero height.
				// So hold that thought until we do.
				m_pendingChartLoc = chartLoc;
				m_pendingChartLocIsBookmark = fbookmark;
			}
			else
			{
				m_pendingChartLoc = null;
			}

			// The following will select the row of the bookmark
			var row = chartLoc.Row;
			IVwSelection sel = MakeRowSelection(row, true);
			if (fbookmark)
				ScrollSelectionIntoView(sel, VwScrollSelOpts.kssoTop);
			else
				ScrollSelectionIntoView(sel, VwScrollSelOpts.kssoNearTop);
			//Update(); ScrollSelectionIntoView() does this, I believe.
		}