mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Stop background process when removing objects from the plater
This commit is contained in:
		
							parent
							
								
									301771e275
								
							
						
					
					
						commit
						51cf78534c
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -475,6 +475,8 @@ sub remove {
 | 
			
		|||
    my $self = shift;
 | 
			
		||||
    my ($obj_idx) = @_;
 | 
			
		||||
    
 | 
			
		||||
    $self->stop_background_process;
 | 
			
		||||
    
 | 
			
		||||
    # if no object index is supplied, remove the selected one
 | 
			
		||||
    if (!defined $obj_idx) {
 | 
			
		||||
        ($obj_idx, undef) = $self->selected_object;
 | 
			
		||||
| 
						 | 
				
			
			@ -489,11 +491,15 @@ sub remove {
 | 
			
		|||
    $self->select_object(undef);
 | 
			
		||||
    $self->update;
 | 
			
		||||
    $self->{canvas}->Refresh;
 | 
			
		||||
    
 | 
			
		||||
    $self->schedule_background_process;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub reset {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    
 | 
			
		||||
    $self->stop_background_process;
 | 
			
		||||
    
 | 
			
		||||
    @{$self->{objects}} = ();
 | 
			
		||||
    $self->{model}->clear_objects;
 | 
			
		||||
    $self->{print}->clear_objects;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue