FIX: context: fix the .gcode.3mf not shown issue (#13360)

filament_self_index difference caused

JIRA: no-jira

Change-Id: Ia70fe8a8095b8067fe13bbfc9e5c39d9f3ee05d3
(cherry picked from commit 3a55a3a1eef94f577376cd697c3b72cb46967672)

Co-authored-by: lane.wei <lane.wei@bambulab.com>
This commit is contained in:
Noisyfox
2026-05-09 13:15:17 +08:00
committed by GitHub
parent fb1f4a7d24
commit 8c7cc6972f
6 changed files with 27 additions and 14 deletions

View File

@@ -3414,12 +3414,13 @@ int PartPlate::load_gcode_from_file(const std::string& filename)
int ret = 0;
// process gcode
DynamicPrintConfig full_config = wxGetApp().preset_bundle->full_config();
std::vector<int> filament_maps = this->get_filament_maps();
DynamicPrintConfig full_config = wxGetApp().preset_bundle->full_config(false, filament_maps);
full_config.apply(m_config, true);
m_print->apply(*m_model, full_config);
m_print->apply(*m_model, full_config, false);
//BBS: need to apply two times, for after the first apply, the m_print got its object,
//which will affect the config when new_full_config.normalize_fdm(used_filaments);
m_print->apply(*m_model, full_config);
m_print->apply(*m_model, full_config, false);
// BBS: use backup path to save temp gcode
// auto path = get_tmp_gcode_path();