X and Y were changed at first by me to PropertyLength and later by Wandererfan to PropertyDistance. For this second change there is handleChangedPropertyType() code missing. This PR adds this.
- also some code formatting improvements automatically done by MSVC