Ah, yeah, it definitely could be. I was basing it off some other code in the file to try and keep code style similar, but that's definitely cleaner.

Reason for this check is to make sure that the double click is in the tab bar itself, not on a tab.