kopia lustrzana https://github.com/inkstitch/inkstitch
				
				
				
			Delete Command Group on Auto-Route and Cut Satin (#1125)
							rodzic
							
								
									22d7aa9305
								
							
						
					
					
						commit
						767ead9081
					
				| 
						 | 
				
			
			@ -31,6 +31,10 @@ class CutSatin(InkstitchExtension):
 | 
			
		|||
                                  'Please use the "Attach commands" extension and attach the "Satin Column cut point" command first.'))
 | 
			
		||||
 | 
			
		||||
                split_point = command.target_point
 | 
			
		||||
                command_group = command.use.getparent()
 | 
			
		||||
                if command_group is not None and command_group.get('id').startswith('command_group'):
 | 
			
		||||
                    command_group.getparent().remove(command_group)
 | 
			
		||||
                else:
 | 
			
		||||
                    command.use.getparent().remove(command.use)
 | 
			
		||||
                    command.connector.getparent().remove(command.connector)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -628,6 +628,10 @@ def operations_to_elements_and_trims(operations, preserve_order):
 | 
			
		|||
def remove_original_elements(elements):
 | 
			
		||||
    for element in elements:
 | 
			
		||||
        for command in element.commands:
 | 
			
		||||
            command_group = command.use.getparent()
 | 
			
		||||
            if command_group is not None and command_group.get('id').startswith('command_group'):
 | 
			
		||||
                remove_from_parent(command_group)
 | 
			
		||||
            else:
 | 
			
		||||
                remove_from_parent(command.connector)
 | 
			
		||||
                remove_from_parent(command.use)
 | 
			
		||||
        remove_from_parent(element.node)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue