Fix the Path tool adding a Path node but not applying the change until a second attempt due to wrong segment IDs (#3727)

* Fix SegmentIds lost when no Path node exists

* fix import order

* Use Arc<Vector> in vector_data for regression
This commit is contained in:
Ayush Amawate
2026-02-14 04:10:38 +05:30
committed by GitHub
parent e606efd008
commit 119a554260
6 changed files with 32 additions and 5 deletions

View File

@@ -249,6 +249,7 @@ pub struct RenderMetadata {
pub first_element_source_id: HashMap<NodeId, Option<NodeId>>,
pub click_targets: HashMap<NodeId, Vec<Arc<ClickTarget>>>,
pub clip_targets: HashSet<NodeId>,
pub vector_data: HashMap<NodeId, Arc<Vector>>,
}
impl RenderMetadata {
@@ -1187,6 +1188,8 @@ impl Render for Table<Vector> {
.collect::<Vec<_>>();
metadata.click_targets.entry(element_id).or_insert(click_targets);
// Store the full vector data including segment IDs for accurate segment modification
metadata.vector_data.entry(element_id).or_insert_with(|| Arc::new(vector.clone()));
}
if let Some(upstream_nested_layers) = &vector.upstream_data {