Some improvements

This commit is contained in:
YuSanka 2019-03-19 14:36:32 +01:00
parent ba54ce0309
commit b7a1bd927a
4 changed files with 19 additions and 3 deletions

View file

@ -295,8 +295,17 @@ wxBitmapComboBox(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(15 *
wxGetApp().tab_panel()->ChangeSelection(page_id);
tab->select_preset(GetString(GetSelection()).ToUTF8().data());
/* In a case of a multi-material printing, for editing another Filament Preset
* it's needed to select this preset for the "Filament settings" Tab
*/
if (preset_type == Preset::TYPE_FILAMENT && wxGetApp().extruders_cnt() > 1)
{
const std::string& selected_preset = GetString(GetSelection()).ToUTF8().data();
// Call select_preset() only if there is new preset and not just modified
if ( !boost::algorithm::ends_with(selected_preset, "(modified)") )
tab->select_preset(selected_preset);
}
}));
}