Fix: fix the crash issue when switch language under Debug mode

Change-Id: Ie6f978099c9b12f69d340ff39552eebafc10ba38
This commit is contained in:
lane.wei 2022-09-28 09:35:43 +08:00 committed by Lane.Wei
parent 4e4472c5b6
commit dc9ff8b826
2 changed files with 5 additions and 2 deletions

View File

@ -1343,6 +1343,9 @@ void MenuFactory::append_menu_item_change_filament(wxMenu* menu)
return; return;
std::vector<wxBitmap*> icons = get_extruder_color_icons(true); std::vector<wxBitmap*> icons = get_extruder_color_icons(true);
if (icons.size() < filaments_cnt) {
BOOST_LOG_TRIVIAL(warning) << boost::format("Warning: icons size %1%, filaments_cnt=%2%")%icons.size()%filaments_cnt;
}
wxMenu* extruder_selection_menu = new wxMenu(); wxMenu* extruder_selection_menu = new wxMenu();
const wxString& name = sels.Count() == 1 ? names[0] : names[1]; const wxString& name = sels.Count() == 1 ? names[0] : names[1];

View File

@ -3829,7 +3829,7 @@ void Plater::priv::update_print_volume_state()
//BBS: use the plate's bounding box instead of the bed's //BBS: use the plate's bounding box instead of the bed's
PartPlate* pp = partplate_list.get_curr_plate(); PartPlate* pp = partplate_list.get_curr_plate();
BuildVolume build_volume(pp->get_shape(), this->bed.build_volume().printable_height()); BuildVolume build_volume(pp->get_shape(), this->bed.build_volume().printable_height());
this->q->model().update_print_volume_state(build_volume); this->model.update_print_volume_state(build_volume);
} }
void Plater::priv::process_validation_warning(StringObjectException const &warning) const void Plater::priv::process_validation_warning(StringObjectException const &warning) const
@ -3909,7 +3909,7 @@ unsigned int Plater::priv::update_background_process(bool force_validation, bool
this->partplate_list.update_slice_context_to_current_plate(background_process); this->partplate_list.update_slice_context_to_current_plate(background_process);
this->preview->update_gcode_result(partplate_list.get_current_slice_result()); this->preview->update_gcode_result(partplate_list.get_current_slice_result());
} }
Print::ApplyStatus invalidated = background_process.apply(q->model(), wxGetApp().preset_bundle->full_config()); Print::ApplyStatus invalidated = background_process.apply(this->model, wxGetApp().preset_bundle->full_config());
if ((invalidated == Print::APPLY_STATUS_CHANGED) || (invalidated == Print::APPLY_STATUS_INVALIDATED)) if ((invalidated == Print::APPLY_STATUS_CHANGED) || (invalidated == Print::APPLY_STATUS_INVALIDATED))
// BBS: add only gcode mode // BBS: add only gcode mode