If you leave the little icon locked, grab one of the corner handles (say the top right for example), and instead of dragging left and down you drag left and up, it will switch orientation but retain the same proportions. The 'X' key does the same thing, as John already mentioned.
Mike.