related to issue #489, make sure that when the brush is deselected it turns off
fixing tests
Merge pull request #515