inkstitch / inkstitch

Ink/Stitch: an Inkscape extension for machine embroidery design
https://inkstitch.org
GNU General Public License v3.0
955 stars 170 forks source link

Clones of commands have broken connectors. #3085

Open capellancitizen opened 2 months ago

capellancitizen commented 2 months ago

image image image

drawing-5.zip

It seems like the cloned paths that form our command connectors have inkscape:connection-{start,end} that still refer back to the original object, not the cloned version, so when the file is loaded back in or the commands in the original are adjusted, the connectors can "snap back" to the original versions.

As far as I can tell the only real option is to rework commands so they don't use connectors, but of course that's a big overhaul. That, or create a PR for Inkscape that changes how cloned connectors work, and change inkex so copying elements with inkscape:connection fixes the references.

kaalleen commented 1 month ago

I just tried your file on my computer and it works surprisingly well. I know that duplicating commands really breaks them, while copying commands works. Cloning them seems to actually work too on my end. Didn't think it would. So it might be system dependent if it works or not. Did you try with Inkscape 1.4 as well?

capellancitizen commented 1 month ago

I think I tested on Inkscape 1.3, but I'll double-check after work.

capellancitizen commented 1 month ago

Yeah, these still seem to be broken on 1.3, though 1.4 seems to handle them a lot better. The changes in my recent commit change the clone unlinking/"resolution" so that commands that are children of clones will have their connector targets properly re-pointed to element in the tree, so they should just work now.

I suppose we can close this, but do you think it'd be worth adding a note to the docs to inform users that inkscape 1.3 and older may show these issues if you clone commands?

kaalleen commented 4 weeks ago

Yes sure. That would be good to have it documented. Do you want to do the documentation?

capellancitizen commented 3 weeks ago

Sure. Do you have a particular opinion on where it should go? There isn't a clone page, so I could either put it in Unlink Clone, FAQs, or Inkscape Tips, or I could create a Clone page I guess, now that it has some more functionality...

kaalleen commented 3 weeks ago

Hmm, clones are not really a stitch type. But I do think they deserve their own page.