vmoyseenko/Dynamo — pull request #1 by aosyatnik (2014-09-19 11:29:25+00:00)
Title: The problem: sender is wrong sometimes.

# Bug
[MAGN-4689](http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-4689) DUI: Sometimes the math list is not highlighted when the list under math is open
![image](https://cloud.githubusercontent.com/assets/8158404/4334416/b05c749c-3fee-11e4-9782-2fe791afe3fa.png)
Steps to reproduce:
1. Click Color.
2. Click Formula.
3. Make this several times, at 2nd or 3rd it will be broken.
The same thing occurs sometimes with every item and item directly under it.
Catch this bug during debugging is impossible. if put breakpoint inside `OnClassViewSelectionChanged` everything will work correctly... allways.
# Reason
Problem is that `sender` in `OnClassViewSelectionChanged` is wrong.
# Solution
It seems it's time for Workaround.
When classButton is clicked, I save its' Content as `static BrowserInternalElement SelectedItem` and then check whether sender equals to it or not.
# Reviewers
@vmoyseenko, please take a look.