Remove Double-Click Behavior for Switching to Path Tool on Non-Path Layers (#2116)

* Remove double-click behavior for switching to Path tool on non-Path layers

* removed the else-if block

* removed the path tool activation from shallowm mode

---------

Co-authored-by: Pratik Agrawal <patrik@Pratiks-MacBook-Air.local>
This commit is contained in:
Pratik Agrawal 2024-11-26 22:03:14 +05:30 committed by GitHub
parent 9fb494764c
commit 2cf33e45bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1208,11 +1208,6 @@ fn drag_deepest_manipulation(responses: &mut VecDeque<Message>, selected: Vec<La
}
fn edit_layer_shallowest_manipulation(document: &DocumentMessageHandler, layer: LayerNodeIdentifier, responses: &mut VecDeque<Message>) {
if document.network_interface.selected_nodes(&[]).unwrap().selected_layers_contains(layer, document.metadata()) {
responses.add_front(ToolMessage::ActivateTool { tool_type: ToolType::Path });
return;
}
let Some(new_selected) = layer.ancestors(document.metadata()).filter(not_artboard(document)).find(|ancestor| {
ancestor
.parent(document.metadata())
@ -1233,7 +1228,5 @@ fn edit_layer_deepest_manipulation(layer: LayerNodeIdentifier, network_interface
if is_layer_fed_by_node_of_name(layer, network_interface, "Text") {
responses.add_front(ToolMessage::ActivateTool { tool_type: ToolType::Text });
responses.add(TextToolMessage::EditSelected);
} else if is_layer_fed_by_node_of_name(layer, network_interface, "Path") {
responses.add_front(ToolMessage::ActivateTool { tool_type: ToolType::Path });
}
}