@@ -969,7 +969,7 @@ impl<'a> MessageHandler<NodeGraphMessage, NodeGraphMessageContext<'a>> for NodeG
969969 }
970970
971971 // Clicked on the graph background so we box select
972- if !shift_click {
972+ if !shift_click && !alt_click {
973973 responses. add ( NodeGraphMessage :: SelectedNodesSet { nodes : Vec :: new ( ) } )
974974 }
975975 self . box_selection_start = Some ( ( node_graph_point, false ) ) ;
@@ -1926,12 +1926,13 @@ impl<'a> MessageHandler<NodeGraphMessage, NodeGraphMessageContext<'a>> for NodeG
19261926 . transform_point2 ( ipp. mouse . position ) ;
19271927
19281928 let shift = ipp. keyboard . get ( Key :: Shift as usize ) ;
1929+ let alt = ipp. keyboard . get ( Key :: Alt as usize ) ;
19291930 let Some ( selected_nodes) = network_interface. selected_nodes_in_nested_network ( selection_network_path) else {
19301931 log:: error!( "Could not get selected nodes in UpdateBoxSelection" ) ;
19311932 return ;
19321933 } ;
19331934 let previous_selection = selected_nodes. selected_nodes_ref ( ) . iter ( ) . cloned ( ) . collect :: < HashSet < _ > > ( ) ;
1934- let mut nodes = if shift {
1935+ let mut nodes = if shift || alt {
19351936 selected_nodes. selected_nodes_ref ( ) . iter ( ) . cloned ( ) . collect :: < HashSet < _ > > ( )
19361937 } else {
19371938 HashSet :: new ( )
@@ -1944,7 +1945,11 @@ impl<'a> MessageHandler<NodeGraphMessage, NodeGraphMessageContext<'a>> for NodeG
19441945 } ;
19451946 let quad = Quad :: from_box ( [ box_selection_start, box_selection_end_graph] ) ;
19461947 if click_targets. node_click_target . intersect_path ( || quad. to_lines ( ) , DAffine2 :: IDENTITY ) {
1947- nodes. insert ( node_id) ;
1948+ if alt {
1949+ nodes. remove ( & node_id) ;
1950+ } else {
1951+ nodes. insert ( node_id) ;
1952+ }
19481953 }
19491954 }
19501955 if nodes != previous_selection {
@@ -2739,7 +2744,11 @@ impl NodeGraphMessageHandler {
27392744 let mut hint_data = HintData ( vec ! [
27402745 HintGroup ( vec![ HintInfo :: mouse( MouseMotion :: Rmb , "Add Node" ) ] ) ,
27412746 HintGroup ( vec![ HintInfo :: mouse( MouseMotion :: Lmb , "Select Node" ) , HintInfo :: keys( [ Key :: Shift ] , "Extend" ) . prepend_plus( ) ] ) ,
2742- HintGroup ( vec![ HintInfo :: mouse( MouseMotion :: LmbDrag , "Select Area" ) , HintInfo :: keys( [ Key :: Shift ] , "Extend" ) . prepend_plus( ) ] ) ,
2747+ HintGroup ( vec![
2748+ HintInfo :: mouse( MouseMotion :: LmbDrag , "Select Area" ) ,
2749+ HintInfo :: keys( [ Key :: Shift ] , "Extend" ) . prepend_plus( ) ,
2750+ HintInfo :: keys( [ Key :: Alt ] , "Subtract" ) . prepend_plus( ) ,
2751+ ] ) ,
27432752 ] ) ;
27442753 if self . has_selection {
27452754 hint_data. 0 . extend ( [
0 commit comments