mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Bugfix: dirty filament options were ignored when using multiple extruders. Patch by @markwal. #2740
This commit is contained in:
		
							parent
							
								
									92b980b10e
								
							
						
					
					
						commit
						2d7bfbb805
					
				
					 1 changed files with 10 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -635,13 +635,19 @@ sub config {
 | 
			
		|||
    if (!$self->{plater} || $self->{plater}->filament_presets == 1 || $self->{mode} eq 'simple') {
 | 
			
		||||
        $filament_config = $self->{options_tabs}{filament}->config;
 | 
			
		||||
    } else {
 | 
			
		||||
        # TODO: handle dirty presets.
 | 
			
		||||
        # perhaps plater shouldn't expose dirty presets at all in multi-extruder environments.
 | 
			
		||||
        my $i = -1;
 | 
			
		||||
        foreach my $preset_idx ($self->{plater}->filament_presets) {
 | 
			
		||||
            $i++;
 | 
			
		||||
            my $preset = $self->{options_tabs}{filament}->get_preset($preset_idx);
 | 
			
		||||
            my $config = $self->{options_tabs}{filament}->get_preset_config($preset);
 | 
			
		||||
            my $config;
 | 
			
		||||
            if ($preset_idx == $self->{options_tabs}{filament}->current_preset) {
 | 
			
		||||
                # the selected preset for this extruder is the one in the tab
 | 
			
		||||
                # use the tab's config instead of the preset in case it is dirty
 | 
			
		||||
                # perhaps plater shouldn't expose dirty presets at all in multi-extruder environments.
 | 
			
		||||
                $config = $self->{options_tabs}{filament}->config;
 | 
			
		||||
            } else {
 | 
			
		||||
                my $preset = $self->{options_tabs}{filament}->get_preset($preset_idx);
 | 
			
		||||
                $config = $self->{options_tabs}{filament}->get_preset_config($preset);
 | 
			
		||||
            }
 | 
			
		||||
            if (!$filament_config) {
 | 
			
		||||
                $filament_config = $config->clone;
 | 
			
		||||
                next;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue