mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
FIX: exist 0 in filament map
jira:NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: Ieb592105036e78c6ce7a246da41c2575b8236a81 (cherry picked from commit bb277efd5aa88bfd636aa3ca87bc937fbd99704f)
This commit is contained in:
@@ -3391,7 +3391,6 @@ void PartPlate::clear_filament_map_mode()
|
|||||||
{
|
{
|
||||||
if (m_config.has("filament_map_mode"))
|
if (m_config.has("filament_map_mode"))
|
||||||
m_config.erase("filament_map_mode");
|
m_config.erase("filament_map_mode");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<std::vector<int>>& PartPlate::get_unprintable_filament_ids()
|
const std::vector<std::vector<int>>& PartPlate::get_unprintable_filament_ids()
|
||||||
@@ -3414,7 +3413,9 @@ void PartPlate::on_extruder_count_changed(int extruder_count)
|
|||||||
wxGetApp().plater()->set_global_filament_map(f_map);
|
wxGetApp().plater()->set_global_filament_map(f_map);
|
||||||
// clear filament map and mode in single extruder mode
|
// clear filament map and mode in single extruder mode
|
||||||
clear_filament_map();
|
clear_filament_map();
|
||||||
clear_filament_map_mode();
|
//clear_filament_map_mode();
|
||||||
|
// do not clear mode now, reset to default mode
|
||||||
|
m_config.option<ConfigOptionEnum<FilamentMapMode>>("filament_map_mode", true)->value = FilamentMapMode::fmmAutoForFlush;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3422,7 +3423,7 @@ void PartPlate::set_filament_count(int filament_count)
|
|||||||
{
|
{
|
||||||
if (m_config.has("filament_map")) {
|
if (m_config.has("filament_map")) {
|
||||||
std::vector<int>& filament_maps = m_config.option<ConfigOptionInts>("filament_map")->values;
|
std::vector<int>& filament_maps = m_config.option<ConfigOptionInts>("filament_map")->values;
|
||||||
filament_maps.resize(filament_count);
|
filament_maps.resize(filament_count, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user