inkscape-guide-tools icon indicating copy to clipboard operation
inkscape-guide-tools copied to clipboard

Moved units for selected object to correct base units and added selection of objects

Open danyill opened this issue 7 years ago • 1 comments

As others have done PRs for unittouu class references, this includes these otherwise the extension fails to run on recent versions of Inkscape.

This PR resolves guides not being added in the correct place for selected objects when using 'Add Centered Guides to Page or Selection' or 'Add Margin Guides to Page or Selection'.

The material change is a single line, from:

q[query] = p.stdout.read()

to

q[query] =  self.unittouu(p.stdout.read() + 'px')

Although it took me some time to figure that out! :-) This ensures that the units used for the calculation use the same base. At least, without deeper inspection this appears to work.

danyill avatar Apr 10 '17 19:04 danyill

I've updated to allow for selection of multiple objects and then adding either margin or centered guides. I've re-written the subprocess calls to reduce the number of calls and speed up the process by querying all objects and then parsing them.

I've also updated the documentation.

I'd welcome any comments.

danyill avatar Apr 11 '17 19:04 danyill

I guess this is dead by now.

danyill avatar Apr 11 '24 20:04 danyill