/// <summary>
 /// Resets the state of the current layer.
 /// </summary>
 /// <param name="resetState"></param>
 void ResetLayer(bool resetState)
 {
     // Select the first link
     if (resetState)
     {
         CurrentLayer.Reset();
         SelectFirstLink();
     }
     // Otherwise, go back to the previous state
     else
     {
         this.CurrentLink = CurrentLayer.Restore();
     }
 }