bulia byak wrote:
Bob, I think your latest changes may result in invalid SVG (which is why I inserted nodepath_destroy and delete_selection in the first place). E.g.:
create a path
f2
select all nodes but one
del
f1
The statusbar says "Path (0 nodes)", and in XML editor, you will see a <path> with an empty d= attribute. I believe this is invalid SVG, and in any case it's better to avoid such situations. Which is why I added deleting a nodepath which has only one node left. Please fix this somehow.
I will look at it today. I commented those out because of this general node-deleting problem, not just that function:
- create a path
- f2
- select all nodes
- del
This creates a segfault, (apparently) because the nodepath was being destroyed more than once.
So, maybe there is a way we can delete it, but prevent more code downstream from trying to access the nonexistent nodepath again. (Count the nodes?) I will look into that this morning.
Also, your new command "split path between nodes" gives too generic statusbar error messages. It only works for two adjacent nodes none of which is an end node of a subpath, but when some of these requirements is not met it simply says "You must select two nodes on a path". Please provide more specific diagnostics for non-adjacent nodes, end nodes, more than two nodes, etc.
It might be useful to generalize this command so it would work on any number of adjacent nodes by first deleting all middle nodes and then removing the segment between the remaining two selected nodes.
We had a group on Jabber talking about this last night; to not only allow that, (which is easy) but also to allow splitting open a closed path (which is a bit harder). I need to work that one out on paper first! ;-)
Your tooltip says "Split a path..." - first, it should be simply "Split path"; second, all other tooltips for node tool refer to "lines" but I believe "path" is better, so could you please edit other tooltips too, replacing "lines" by "paths"?
Will do that, too.
Bob