mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Merge branch 'cpp_ui_optimization' into updating
This commit is contained in:
		
						commit
						a3d5251b8e
					
				
					 2 changed files with 4 additions and 23 deletions
				
			
		| 
						 | 
				
			
			@ -161,8 +161,12 @@ sub thread_cleanup {
 | 
			
		|||
    *Slic3r::Print::SupportMaterial2::DESTROY = sub {};
 | 
			
		||||
    *Slic3r::TriangleMesh::DESTROY          = sub {};
 | 
			
		||||
    *Slic3r::GUI::AppConfig::DESTROY        = sub {};
 | 
			
		||||
    *Slic3r::GUI::GCodePreviewData::DESTROY = sub {};
 | 
			
		||||
    *Slic3r::GUI::PresetBundle::DESTROY     = sub {};
 | 
			
		||||
    *Slic3r::GUI::Tab::DESTROY              = sub {};
 | 
			
		||||
    *Slic3r::GUI::PresetHints::DESTROY      = sub {};
 | 
			
		||||
    *Slic3r::GUI::TabIface::DESTROY         = sub {};
 | 
			
		||||
    *Slic3r::OctoPrint::DESTROY             = sub {};
 | 
			
		||||
    *Slic3r::PresetUpdater::DESTROY         = sub {};
 | 
			
		||||
    return undef;  # this prevents a "Scalars leaked" warning
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1004,29 +1004,6 @@ void TabPrint::update()
 | 
			
		|||
		on_value_change("fill_density", fill_density);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	auto first_layer_height = m_config->option<ConfigOptionFloatOrPercent>("first_layer_height")->value;
 | 
			
		||||
	auto layer_height = m_config->opt_float("layer_height");
 | 
			
		||||
	if (m_config->opt_bool("wipe_tower") &&
 | 
			
		||||
		(first_layer_height != 0.2 || layer_height < 0.15 || layer_height > 0.35)) {
 | 
			
		||||
		wxString msg_text = _(L("The Wipe Tower currently supports only:\n"
 | 
			
		||||
			"- first layer height 0.2mm\n"
 | 
			
		||||
			"- layer height from 0.15mm to 0.35mm\n"
 | 
			
		||||
			"\nShall I adjust those settings in order to enable the Wipe Tower?"));
 | 
			
		||||
		auto dialog = new wxMessageDialog(parent(), msg_text, _(L("Wipe Tower")), wxICON_WARNING | wxYES | wxNO);
 | 
			
		||||
		DynamicPrintConfig new_conf = *m_config;
 | 
			
		||||
		if (dialog->ShowModal() == wxID_YES) {
 | 
			
		||||
			const auto &val = *m_config->option<ConfigOptionFloatOrPercent>("first_layer_height");
 | 
			
		||||
			auto percent = val.percent;
 | 
			
		||||
			new_conf.set_key_value("first_layer_height", new ConfigOptionFloatOrPercent(0.2, percent));
 | 
			
		||||
 | 
			
		||||
			if (m_config->opt_float("layer_height") < 0.15) new_conf.set_key_value("layer_height", new ConfigOptionFloat(0.15));
 | 
			
		||||
			if (m_config->opt_float("layer_height") > 0.35) new_conf.set_key_value("layer_height", new ConfigOptionFloat(0.35));
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
			new_conf.set_key_value("wipe_tower", new ConfigOptionBool(false));
 | 
			
		||||
		load_config(new_conf);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (m_config->opt_bool("wipe_tower") && m_config->opt_bool("support_material") &&
 | 
			
		||||
		m_config->opt_float("support_material_contact_distance") > 0. &&
 | 
			
		||||
		(m_config->opt_int("support_material_extruder") != 0 || m_config->opt_int("support_material_interface_extruder") != 0)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue