mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-02 23:58:11 +08:00
Revert double-click to open node catalog from #2423 because it occurs even outside the graph
This commit is contained in:
@@ -302,30 +302,6 @@ impl<'a> MessageHandler<NodeGraphMessage, NodeGraphHandlerData<'a>> for NodeGrap
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let Some(network_metadata) = network_interface.network_metadata(selection_network_path) else {
|
|
||||||
log::error!("Could not get network metadata in NodeGraphMessage::EnterNestedNetwork");
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
|
|
||||||
let click = ipp.mouse.position;
|
|
||||||
let node_graph_point = network_metadata.persistent_metadata.navigation_metadata.node_graph_to_viewport.inverse().transform_point2(click);
|
|
||||||
|
|
||||||
// Check if clicked on empty area (no node, no input/output connector)
|
|
||||||
let clicked_id = network_interface.node_from_click(click, selection_network_path);
|
|
||||||
let clicked_input = network_interface.input_connector_from_click(click, selection_network_path);
|
|
||||||
let clicked_output = network_interface.output_connector_from_click(click, selection_network_path);
|
|
||||||
|
|
||||||
if clicked_id.is_none() && clicked_input.is_none() && clicked_output.is_none() && self.context_menu.is_none() {
|
|
||||||
// Create a context menu with node creation options
|
|
||||||
self.context_menu = Some(ContextMenuInformation {
|
|
||||||
context_menu_coordinates: (node_graph_point.x as i32, node_graph_point.y as i32),
|
|
||||||
context_menu_data: ContextMenuData::CreateNode { compatible_type: None },
|
|
||||||
});
|
|
||||||
|
|
||||||
responses.add(FrontendMessage::UpdateContextMenuInformation {
|
|
||||||
context_menu_information: self.context_menu.clone(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
let Some(node_id) = network_interface.node_from_click(ipp.mouse.position, selection_network_path) else {
|
let Some(node_id) = network_interface.node_from_click(ipp.mouse.position, selection_network_path) else {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user