replace magic number -1 with PXPreferencesTabNone

Also, I reversed the conditional to improve readability