mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Fix: PlaceholderParser float comparison
This commit is contained in:
		
							parent
							
								
									35d984b812
								
							
						
					
					
						commit
						d92530b4b8
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -111,9 +111,9 @@ bool PlaceholderParser::apply_config(const DynamicPrintConfig &rhs)
 | 
			
		|||
        const ConfigOption *opt_rhs = rhs.option(opt_key);
 | 
			
		||||
        const ConfigOption *opt_old = m_config.option(opt_key, false);
 | 
			
		||||
        if (opt_old != nullptr) {
 | 
			
		||||
            if ((opt_rhs->type() == coFloatOrPercent && 
 | 
			
		||||
                 dynamic_cast<const ConfigOptionFloat*>(opt_old)->value == rhs.get_abs_value(opt_key)) ||
 | 
			
		||||
                *opt_rhs == *opt_old)
 | 
			
		||||
            if (opt_rhs->type() == coFloatOrPercent ?
 | 
			
		||||
                 dynamic_cast<const ConfigOptionFloat*>(opt_old)->value == rhs.get_abs_value(opt_key)
 | 
			
		||||
                : *opt_rhs == *opt_old)
 | 
			
		||||
                // no need to update
 | 
			
		||||
                continue;
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue