mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 20:51:12 -06:00 
			
		
		
		
	FIX: [STUDIO-909] not dynamic inc filament_presets size
Change-Id: Ie231667213cceec1bca56e1af8eabd6503bd3fed
This commit is contained in:
		
							parent
							
								
									82f1bad002
								
							
						
					
					
						commit
						67fd44c551
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -3486,8 +3486,10 @@ std::vector<std::string> PresetBundle::export_current_configs(const std::string | |||
| // an optional "(modified)" suffix will be removed from the filament name.
 | ||||
| void PresetBundle::set_filament_preset(size_t idx, const std::string &name) | ||||
| { | ||||
| 	if (idx >= filament_presets.size()) | ||||
|         filament_presets.resize(idx + 1, filaments.default_preset().name); | ||||
|     if (idx >= filament_presets.size()) { | ||||
|         BOOST_LOG_TRIVIAL(warning) << boost::format("Warning: set_filament_preset out of range %1% - %2%") % idx % filament_presets.size(); | ||||
|         return; | ||||
|     } | ||||
|     filament_presets[idx] = Preset::remove_suffix_modified(name); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 chunmao.guo
						chunmao.guo