After some time, I decided to create a script myself, to work around this problem, using
Autohotkey.
It basically looks for the color of the active track within the PRV. Important: the color it looks for is #cfeffa (Sonar default theme); If you use another theme, change the color of the active track within this script.
And also, for the sake of ergonomics,
I remaped the "E" key to perform this function. So this script will intercept this key and it will not have another function inside Sonar.
SetTitleMatchMode RegEx
#IfWinActive, ahk_exe i)SONAR.*exe
e:: ; Pressing "E" in Piano Roll View, shows only the current track and hide all others
IfWinNotActive, Piano Roll
{
send e
Return
}
ControlGetPos, x, y, w, h, ListBox1
PixelSearch, Px, Py, %x%, %y%, (x + w), (y + h), 0xcfeffa, , fast RGB
if ErrorLevel
{
MsgBox, Active track not found. Select one track in PRV.
return
}
Send, h ; hide all tracks on prv
MouseMove (Px - 38), (Py + 8) ; pos over "show/hide" button
Click
MouseMove xx, yy ; recover original mouse position
Return