There are probably many more cases in which the menu looks a little different.
However, I don't know them all and it's too easy to break something accidentally here.
Maybe a user could try the different combinations of object types and check if there are entries that should not be there.
Code style: I decided to put the statement on the same line as the if again because to me that is much easier to read in this case.
To me, the amount of lines a code segment has should somewhat proportional to the amount of things happening there.
I'll change it, if you think I should do so.