replaced he align-in-rectangle function with a more general method that will make all angles in the selected shape orthogonal. if, in addition to one or more ways, exactly two nodes are also selected, then these two nodes determine the orientation of each resulting segment, otherwise a best match is chosen. Patch by Harald Kucharek.