fix bug with undefined behavior when user clicked on identifier with key "Ctrl"
done issue #152
done issue #152
removed dynamic_cast
fixed code style
fix some errors
Merge pull request #299 from asvitenkov/master

Done issue #152 + fix bug