fixed bug in removeLine function

if there is no outlet, the line is removed from the source
remove lines when switching tools
remove lines when clicking in the menu
changed toolbox actions

if you click on a tool that's already selected it stays selected