[#1787] Deselect components when no components clicked
This commit is contained in:
		
							parent
							
								
									d3e872478d
								
							
						
					
					
						commit
						6f6fc1dd23
					
				@ -609,7 +609,11 @@ public class RocketPanel extends JPanel implements TreeSelectionListener, Change
 | 
			
		||||
		List<RocketComponent> selectedComponents = Arrays.stream(selectionModel.getSelectionPaths())
 | 
			
		||||
				.map(c -> (RocketComponent) c.getLastPathComponent()).collect(Collectors.toList());
 | 
			
		||||
 | 
			
		||||
		if (clicked == null || clicked.length == 0) return;
 | 
			
		||||
		if (clicked == null || clicked.length == 0) {
 | 
			
		||||
			selectionModel.setSelectionPaths(null);
 | 
			
		||||
			ComponentConfigDialog.disposeDialog();
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Check for double-click.
 | 
			
		||||
		// If the shift/meta key is not pressed and the component was not already selected, ignore the double click and treat it as a single click
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user