Merge "Fix a couple of rotation bugs" into qt-dev