test-added documented code lines for MainTab_SelectionChanged