Issue #4986: Fix a bug that repeat rotation error
Merge pull request #1866 from VisualSJ/develop-5-20

Issue #4986: Fix a bug that repeat rotation error