mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Fix for #6921 - Error while disabling filament overrides in Dutch language
This commit is contained in:
		
							parent
							
								
									beee18f229
								
							
						
					
					
						commit
						a115da6334
					
				
					 1 changed files with 7 additions and 4 deletions
				
			
		| 
						 | 
					@ -230,18 +230,21 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
        double val;
 | 
					        double val;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        bool is_na_value = m_opt.nullable && str == na_value();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const char dec_sep = is_decimal_separator_point() ? '.' : ',';
 | 
					        const char dec_sep = is_decimal_separator_point() ? '.' : ',';
 | 
				
			||||||
        const char dec_sep_alt = dec_sep == '.' ? ',' : '.';
 | 
					        const char dec_sep_alt = dec_sep == '.' ? ',' : '.';
 | 
				
			||||||
        // Replace the first incorrect separator in decimal number.
 | 
					        // Replace the first incorrect separator in decimal number, 
 | 
				
			||||||
        if (str.Replace(dec_sep_alt, dec_sep, false) != 0)
 | 
					        // if this value doesn't "N/A" value in some language
 | 
				
			||||||
 | 
					        // see https://github.com/prusa3d/PrusaSlicer/issues/6921
 | 
				
			||||||
 | 
					        if (!is_na_value && str.Replace(dec_sep_alt, dec_sep, false) != 0)
 | 
				
			||||||
            set_value(str, false);
 | 
					            set_value(str, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
        if (str == dec_sep)
 | 
					        if (str == dec_sep)
 | 
				
			||||||
            val = 0.0;
 | 
					            val = 0.0;
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (m_opt.nullable && str == na_value())
 | 
					            if (is_na_value)
 | 
				
			||||||
                val = ConfigOptionFloatsNullable::nil_value();
 | 
					                val = ConfigOptionFloatsNullable::nil_value();
 | 
				
			||||||
            else if (!str.ToDouble(&val))
 | 
					            else if (!str.ToDouble(&val))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue