You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Select them both in the layer panel (with shift + click)
Go to path tool
Select one point from the first line and one point from the second line
Attempt to join with Ctrl + J
Logic
The line tool always produces PointId(1) and PointId(2), so when merging the two layers, the point ids of the second line must change to avoid conflict. This causes an issue with the Ctrl+J functionality since it assumes that the PointIds do not change.
PointIds are only guaranteed to be unique within the Vector<Upstream> because same path node must always output the same IDs (since it is a pure function with no input) and you can use the output of the path node several times.
Therefore the Ctrl+J shape_editor.close_selected_path must deal with the fact that the PointIds it holds may change after running merge_layers.
Code for joining layers and adding new segment (currently mistakenly assumes that the PointId will not change after merging):
To reproduce:
Logic
The line tool always produces
PointId(1)andPointId(2), so when merging the two layers, the point ids of the second line must change to avoid conflict. This causes an issue with the Ctrl+J functionality since it assumes that thePointIds do not change.PointIds are only guaranteed to be unique within theVector<Upstream>because same path node must always output the same IDs (since it is a pure function with no input) and you can use the output of the path node several times.Therefore the Ctrl+J
shape_editor.close_selected_pathmust deal with the fact that thePointIds it holds may change after runningmerge_layers.Code for joining layers and adding new segment (currently mistakenly assumes that the
PointIdwill not change after merging):Graphite/editor/src/messages/tool/common_functionality/shape_editor.rs
Lines 461 to 470 in 9d26c04
Code that resolves the new ID when there are two conflicting point ids:
Graphite/node-graph/nodes/vector/src/vector_nodes.rs
Lines 1247 to 1251 in 9d26c04
Reproduction video
cannot_join.mp4