Fix for #363

Also needed to compare TextSegment as well as ToolTipText types.