Improve the tank window hide/show logic a little.

So that's what the PartActionUI events are for :P

Also, put the action group editor events in the edge detection code where
they belong :P