/// <summary> /// Ensures a point is visible on the active display (expands the draw window /// if necessary), and optionally selects it. /// </summary> /// <param name="p">The point that needs to be shown.</param> /// <param name="select">Specify true if the point should be selected.</param> internal void EnsureVisible(PointFeature p, bool select) { // Ensure the draw window shows the point. ISpatialDisplay display = ActiveDisplay; IWindow drawExtent = display.Extent; if (drawExtent == null || drawExtent.IsEmpty) { display.DrawOverview(); } else if (!drawExtent.IsOverlap(p)) { display.Center = p; } // Select the point if requested if (select) { SetSelection(new Selection(p, p)); } }