mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Fix #1526 --datadir not working
This commit is contained in:
		
							parent
							
								
									360dbca52e
								
							
						
					
					
						commit
						237eaa5f6f
					
				
					 2 changed files with 13 additions and 0 deletions
				
			
		|  | @ -3118,6 +3118,13 @@ CLIConfigDef::CLIConfigDef() | |||
| const CLIConfigDef cli_config_def; | ||||
| DynamicPrintAndCLIConfig::PrintAndCLIConfigDef DynamicPrintAndCLIConfig::s_def; | ||||
| 
 | ||||
| void DynamicPrintAndCLIConfig::handle_legacy(t_config_option_key &opt_key, std::string &value) const | ||||
| { | ||||
|     if (cli_config_def.options.find(opt_key) == cli_config_def.options.end()) { | ||||
|         PrintConfigDef::handle_legacy(opt_key, value); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| std::ostream& print_cli_options(std::ostream& out) | ||||
| { | ||||
|     for (const auto& opt : cli_config_def.options) { | ||||
|  |  | |||
|  | @ -1171,6 +1171,12 @@ public: | |||
|     const ConfigDef*        def() const override { return &s_def; } | ||||
|     t_config_option_keys    keys() const override { return s_def.keys(); } | ||||
| 
 | ||||
|     // Verify whether the opt_key has not been obsoleted or renamed.
 | ||||
|     // Both opt_key and value may be modified by handle_legacy().
 | ||||
|     // If the opt_key is no more valid in this version of Slic3r, opt_key is cleared by handle_legacy().
 | ||||
|     // handle_legacy() is called internally by set_deserialize().
 | ||||
|     void                    handle_legacy(t_config_option_key &opt_key, std::string &value) const override; | ||||
| 
 | ||||
| private: | ||||
|     class PrintAndCLIConfigDef : public ConfigDef | ||||
|     { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vojtech Kral
						Vojtech Kral