#735 fix extruder name crash when single_extruder_multi_material

This commit is contained in:
supermerill 2020-11-30 17:17:47 +01:00
parent fa4aab027b
commit 2ff11f360b
2 changed files with 2 additions and 2 deletions

View File

@ -3778,7 +3778,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Tool name");
def->category = OptionCategory::extruders;
def->tooltip = L("Only used for klipper, where you can name the extruder. If not set, will be 'extruderX' with 'X' replaced by the extruder number.");
def->mode = comAdvanced;
def->mode = comExpert;
def->set_default_value(new ConfigOptionStrings(""));
def = this->add("top_infill_extrusion_width", coFloatOrPercent);

View File

@ -1914,7 +1914,7 @@ bool Tab::create_pages(std::string setting_type_name, int idx_page)
{
TabPrinter* tab = nullptr;
if ((tab = dynamic_cast<TabPrinter*>(this)) == nullptr) return;
if (m_config->opt_bool("single_extruder_multi_material") && tab->m_extruders_count > 1 && opt_key.find_first_of("nozzle_diameter") != std::string::npos)
if (m_config->opt_bool("single_extruder_multi_material") && tab->m_extruders_count > 1 && opt_key.find("nozzle_diameter") != std::string::npos)
{
SuppressBackgroundProcessingUpdate sbpu;
const double new_nd = boost::any_cast<double>(value);