mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
ENH:add log
jira: none Change-Id: I95f709399f63a0d5093d4c6a3dd7bc8f5c4f04b0 (cherry picked from commit c6f7e2e9e029a51c82fecd379ad55ad5e676862c)
This commit is contained in:
@@ -2124,6 +2124,7 @@ unsigned int PresetBundle::sync_ams_list(unsigned int &unknowns, bool use_map, s
|
|||||||
}
|
}
|
||||||
if (ams_filament_presets.empty())
|
if (ams_filament_presets.empty())
|
||||||
return 0;
|
return 0;
|
||||||
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "get filament_colour and from config";
|
||||||
ConfigOptionStrings *filament_color = project_config.option<ConfigOptionStrings>("filament_colour");
|
ConfigOptionStrings *filament_color = project_config.option<ConfigOptionStrings>("filament_colour");
|
||||||
ConfigOptionInts * filament_map = project_config.option<ConfigOptionInts>("filament_map");
|
ConfigOptionInts * filament_map = project_config.option<ConfigOptionInts>("filament_map");
|
||||||
if (use_map) {
|
if (use_map) {
|
||||||
@@ -2191,6 +2192,7 @@ unsigned int PresetBundle::sync_ams_list(unsigned int &unknowns, bool use_map, s
|
|||||||
[](std::vector<std::string> &value) { return value.empty(); }),
|
[](std::vector<std::string> &value) { return value.empty(); }),
|
||||||
ams_multi_color_filment.end());
|
ams_multi_color_filment.end());
|
||||||
if (need_append_colors.size() > 0 && enable_append) {
|
if (need_append_colors.size() > 0 && enable_append) {
|
||||||
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "need_append_colors.size() > 0 && enable_append";
|
||||||
auto get_idx_in_array = [](std::vector<std::string> &presets, std::vector<std::string> &colors, const std::string &preset, const std::string &color) -> int {
|
auto get_idx_in_array = [](std::vector<std::string> &presets, std::vector<std::string> &colors, const std::string &preset, const std::string &color) -> int {
|
||||||
for (size_t i = 0; i < presets.size(); i++) {
|
for (size_t i = 0; i < presets.size(); i++) {
|
||||||
if (presets[i] == preset && colors[i] == color) {
|
if (presets[i] == preset && colors[i] == color) {
|
||||||
@@ -2226,6 +2228,7 @@ unsigned int PresetBundle::sync_ams_list(unsigned int &unknowns, bool use_map, s
|
|||||||
}
|
}
|
||||||
|
|
||||||
update_multi_material_filament_presets();
|
update_multi_material_filament_presets();
|
||||||
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "finish sync ams list";
|
||||||
return this->filament_presets.size();
|
return this->filament_presets.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2919,6 +2919,7 @@ void Sidebar::sync_ams_list(bool is_from_big_sync_btn)
|
|||||||
_L("Sync filaments with AMS"), wxOK);
|
_L("Sync filaments with AMS"), wxOK);
|
||||||
dlg.ShowModal();
|
dlg.ShowModal();
|
||||||
}
|
}
|
||||||
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "on_filament_count_change";
|
||||||
wxGetApp().plater()->on_filament_count_change(n);
|
wxGetApp().plater()->on_filament_count_change(n);
|
||||||
for (auto& c : p->combos_filament)
|
for (auto& c : p->combos_filament)
|
||||||
c->update();
|
c->update();
|
||||||
|
|||||||
@@ -292,9 +292,15 @@ void SyncAmsInfoDialog::deal_ok()
|
|||||||
m_result.direct_sync = false;
|
m_result.direct_sync = false;
|
||||||
m_result.sync_maps.clear();
|
m_result.sync_maps.clear();
|
||||||
for (size_t i = 0; i < m_ams_mapping_result.size(); i++) {
|
for (size_t i = 0; i < m_ams_mapping_result.size(); i++) {
|
||||||
auto& temp = m_result.sync_maps[m_ams_mapping_result[i].id];
|
auto temp_idx = m_ams_mapping_result[i].id;
|
||||||
temp.ams_id = m_ams_mapping_result[i].ams_id;
|
if (temp_idx >= 0 && temp_idx < m_result.sync_maps.size()) {
|
||||||
temp.slot_id = m_ams_mapping_result[i].slot_id;
|
auto &temp = m_result.sync_maps[m_ams_mapping_result[i].id];
|
||||||
|
temp.ams_id = m_ams_mapping_result[i].ams_id;
|
||||||
|
temp.slot_id = m_ams_mapping_result[i].slot_id;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "check error: m_result.sync_maps:" << temp_idx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user