mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Merge branch 'master' of https://github.com/prusa3d/Slic3r into sidebar_fixes
This commit is contained in:
		
						commit
						83b09bffb7
					
				
					 4 changed files with 19 additions and 8 deletions
				
			
		|  | @ -1908,7 +1908,7 @@ DynamicConfig PrintStatistics::config() const | |||
|     config.set_key_value("print_time",                new ConfigOptionString(normal_print_time)); | ||||
|     config.set_key_value("normal_print_time",         new ConfigOptionString(normal_print_time)); | ||||
|     config.set_key_value("silent_print_time",         new ConfigOptionString(silent_print_time)); | ||||
|     config.set_key_value("used_filament",             new ConfigOptionFloat (this->total_used_filament)); | ||||
|     config.set_key_value("used_filament",             new ConfigOptionFloat (this->total_used_filament / 1000.)); | ||||
|     config.set_key_value("extruded_volume",           new ConfigOptionFloat (this->total_extruded_volume)); | ||||
|     config.set_key_value("total_cost",                new ConfigOptionFloat (this->total_cost)); | ||||
|     config.set_key_value("total_weight",              new ConfigOptionFloat (this->total_weight)); | ||||
|  | @ -1924,7 +1924,7 @@ DynamicConfig PrintStatistics::placeholders() | |||
|         "print_time", "normal_print_time", "silent_print_time",  | ||||
|         "used_filament", "extruded_volume", "total_cost", "total_weight",  | ||||
|         "total_wipe_tower_cost", "total_wipe_tower_filament"}) | ||||
|         config.set_key_value(key, new ConfigOptionString(std::string("{") + key + "}"));     | ||||
|         config.set_key_value(key, new ConfigOptionString(std::string("{") + key + "}")); | ||||
|     return config; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -437,12 +437,10 @@ void BackgroundSlicingProcess::prepare_upload() | |||
| 
 | ||||
| 	if (m_print == m_fff_print) { | ||||
| 		m_print->set_status(95, "Running post-processing scripts"); | ||||
| 		run_post_process_scripts(source_path.string(), m_fff_print->config()); | ||||
| 
 | ||||
| 		if (copy_file(m_temp_output_path, source_path.string()) != 0) { | ||||
| 			throw std::runtime_error("Copying of the temporary G-code to the output G-code failed"); | ||||
| 		} | ||||
| 
 | ||||
| 		run_post_process_scripts(source_path.string(), m_fff_print->config()); | ||||
| 		m_upload_job.upload_data.upload_path = m_fff_print->print_statistics().finalize_output_path(m_upload_job.upload_data.upload_path.string()); | ||||
| 	} else { | ||||
| 		m_sla_print->export_raster<SLAZipFmt>(source_path.string()); | ||||
|  |  | |||
|  | @ -143,9 +143,11 @@ void Field::get_value_by_opt_type(wxString& str) | |||
| 			break; | ||||
| 		} | ||||
| 		double val; | ||||
| 		// Replace the first occurence of comma in decimal number.
 | ||||
| 		str.Replace(",", ".", false); | ||||
| 		if(!str.ToCDouble(&val)) | ||||
| 		{ | ||||
| 			show_error(m_parent, _(L("Input value contains incorrect symbol(s).\nUse, please, only digits"))); | ||||
| 			show_error(m_parent, _(L("Invalid numeric input."))); | ||||
| 			set_value(double_to_string(val), true); | ||||
| 		} | ||||
| 		if (m_opt.min > val || val > m_opt.max) | ||||
|  | @ -163,10 +165,12 @@ void Field::get_value_by_opt_type(wxString& str) | |||
|         if (m_opt.type == coFloatOrPercent && !str.IsEmpty() &&  str.Last() != '%') | ||||
|         { | ||||
|             double val; | ||||
| 			// Replace the first occurence of comma in decimal number.
 | ||||
| 			str.Replace(",", ".", false); | ||||
|             if (!str.ToCDouble(&val)) | ||||
|             { | ||||
|                 show_error(m_parent, _(L("Input value contains incorrect symbol(s).\nUse, please, only digits"))); | ||||
|                 set_value(double_to_string(val), true);                 | ||||
|                 show_error(m_parent, _(L("Invalid numeric input."))); | ||||
|                 set_value(double_to_string(val), true); | ||||
|             } | ||||
|             else if (m_opt.sidetext.rfind("mm/s") != std::string::npos && val > m_opt.max || | ||||
|                      m_opt.sidetext.rfind("mm ") != std::string::npos && val > 1) | ||||
|  | @ -334,6 +338,7 @@ void TextCtrl::propagate_value() | |||
| boost::any& TextCtrl::get_value() | ||||
| { | ||||
| 	wxString ret_str = static_cast<wxTextCtrl*>(window)->GetValue(); | ||||
| 	// modifies ret_string!
 | ||||
| 	get_value_by_opt_type(ret_str); | ||||
| 
 | ||||
| 	return m_value; | ||||
|  | @ -727,11 +732,13 @@ boost::any& Choice::get_value() | |||
|     else if (m_opt.gui_type == "f_enum_open") { | ||||
|         const int ret_enum = static_cast<wxComboBox*>(window)->GetSelection(); | ||||
|         if (ret_enum < 0 || m_opt.enum_values.empty() || m_opt.type == coStrings) | ||||
| 			// modifies ret_string!
 | ||||
|             get_value_by_opt_type(ret_str); | ||||
|         else  | ||||
|             m_value = atof(m_opt.enum_values[ret_enum].c_str()); | ||||
|     } | ||||
| 	else	 | ||||
| 		// modifies ret_string!
 | ||||
|         get_value_by_opt_type(ret_str); | ||||
| 
 | ||||
| 	return m_value; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Enrico Turri
						Enrico Turri