When disposing a frame, if there is a selected piece, deselect it.