private void saveCommentButton_Clicked(object sender, EventArgs e)
{
double handX = timelineMenuOpenedPosition.X;
handX = handX + hand.ActualWidth / 2;
blackBack.Visibility = Visibility.Collapsed;
int pos = (int)((handPointX + waveform.getOffset()) / waveform.getPixelsPerSecond() * 30);
Debug.WriteLine("THIS IS THE COMMENT THAT SHOULD BE SAVED: " + commentToSave + " That was the comment");
Debug.WriteLine("THIS IS WHAT'S IN THE COMMENT BOX: " + commentBox.Text);
routine.addComment(selectedSegment, commentBox.Text);
if (selectedSegment == null) Debug.WriteLine("SELECTED SEGMENT WAS NULL! WHYYYYY?!");
commentToSave = "";
comment = "";
annotating = false;
commentBox.Text = "";
commentBoxCanvas.Visibility = Visibility.Collapsed;
renderComment(selectedSegment);
waveform.deselectSegment();
commentButtonCanvas.Visibility = Visibility.Collapsed;
showAllSegments();
Canvas.SetZIndex(segmentCanvas, oldDanceSegmentIndex);
blackBack.Visibility = Visibility.Collapsed;
commentBoxCanvas.Visibility = Visibility.Collapsed;
commentBox.Text = "";
}