Fix a regression with duplicating or pasting vector geometry in the Path tool (#3142)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run

* fix path tool duplication

* fix copy and paste

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Priyanshu 2025-09-08 10:41:15 +05:30 committed by GitHub
parent c384175910
commit 84470b6b6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2789,7 +2789,7 @@ impl Fsm for PathToolFsmState {
segments_map.insert(segment_id, new_segment_id);
let points = pathseg_points(bezier);
let handles = [points.p1, points.p2];
let handles = [points.p1.map(|handle| handle - points.p0), points.p2.map(|handle| handle - points.p3)];
let points = [points_map[&start], points_map[&end]];
let modification_type = VectorModificationType::InsertSegment { id: new_segment_id, points, handles };
@ -2895,7 +2895,7 @@ impl Fsm for PathToolFsmState {
segments_map.insert(segment_id, new_id);
let points = pathseg_points(bezier);
let handles = [points.p1, points.p2];
let handles = [points.p1.map(|handle| handle - points.p0), points.p2.map(|handle| handle - points.p3)];
let points = [points_map[&start], points_map[&end]];
let modification_type = VectorModificationType::InsertSegment { id: new_id, points, handles };