From 13305af8c42053512e432d8f489b0d06760bb92b Mon Sep 17 00:00:00 2001 From: 0HyperCube <78500760+0HyperCube@users.noreply.github.com> Date: Sat, 9 Jul 2022 21:20:37 +0100 Subject: [PATCH] Fix path overlays and pen tool click (#720) * Fix path overlays * Fix pen tool click --- editor/src/viewport_tools/tools/path_tool.rs | 4 ++++ editor/src/viewport_tools/tools/pen_tool.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/editor/src/viewport_tools/tools/path_tool.rs b/editor/src/viewport_tools/tools/path_tool.rs index e335ebdc..97aad268 100644 --- a/editor/src/viewport_tools/tools/path_tool.rs +++ b/editor/src/viewport_tools/tools/path_tool.rs @@ -150,6 +150,10 @@ impl Fsm for PathToolFsmState { // Set the newly targeted layers to visible let layer_paths = document.selected_visible_layers().map(|layer_path| layer_path.to_vec()).collect(); tool_data.shape_editor.set_selected_layers(layer_paths); + // Render the new overlays + for layer_path in tool_data.shape_editor.selected_layers() { + tool_data.overlay_renderer.render_vector_shape_overlays(&document.graphene_document, layer_path.to_vec(), responses); + } // This can happen in any state (which is why we return self) self diff --git a/editor/src/viewport_tools/tools/pen_tool.rs b/editor/src/viewport_tools/tools/pen_tool.rs index f38736e2..fe4b99db 100644 --- a/editor/src/viewport_tools/tools/pen_tool.rs +++ b/editor/src/viewport_tools/tools/pen_tool.rs @@ -222,7 +222,7 @@ impl Fsm for PenToolFsmState { } .into(), ); - responses.push_back(add_anchor(&tool_data.path, VectorAnchor::new(start_position))); + responses.push_back(add_anchor(&tool_data.path, VectorAnchor::new_with_handles(start_position, Some(start_position), Some(start_position)))); } PenToolFsmState::DraggingHandle