mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
FIX: update filament map of plate when switching preset
that has different nozzle nums jira:none Change-Id: If78571ddf4fa7ac17e7dcf47013075821b8567a6 (cherry picked from commit a6ad5c8be86313085922e3063eec2aba029a5a99)
This commit is contained in:
@@ -3198,6 +3198,12 @@ void PartPlate::set_filament_maps(const std::vector<int>& f_maps)
|
||||
filament_maps = f_maps;
|
||||
}
|
||||
|
||||
void PartPlate::on_extruder_count_changed(int extruder_count)
|
||||
{
|
||||
std::vector<int>& filament_maps = m_config.option<ConfigOptionInts>("filament_map", true)->values;
|
||||
std::fill(filament_maps.begin(), filament_maps.end(), 1);
|
||||
}
|
||||
|
||||
void PartPlate::set_filament_count(int filament_count)
|
||||
{
|
||||
std::vector<int>& filament_maps = m_config.option<ConfigOptionInts>("filament_map", true)->values;
|
||||
@@ -3210,7 +3216,6 @@ void PartPlate::on_filament_added()
|
||||
filament_maps.push_back(1);
|
||||
}
|
||||
|
||||
|
||||
void PartPlate::on_filament_deleted(int filament_count, int filament_id)
|
||||
{
|
||||
std::vector<int>& filament_maps = m_config.option<ConfigOptionInts>("filament_map", true)->values;
|
||||
@@ -5793,6 +5798,14 @@ void PartPlateList::load_cali_textures()
|
||||
PartPlateList::is_load_cali_texture = true;
|
||||
}
|
||||
|
||||
void PartPlateList::on_extruder_count_changed(int extruder_count)
|
||||
{
|
||||
for (unsigned int i = 0; i < (unsigned int) m_plate_list.size(); ++i) {
|
||||
m_plate_list[i]->on_extruder_count_changed(extruder_count);
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << boost::format("%1%: extruder_count=%2%")% __FUNCTION__ %extruder_count;
|
||||
}
|
||||
|
||||
void PartPlateList::set_filament_count(int filament_count)
|
||||
{
|
||||
m_filament_count = filament_count;
|
||||
|
||||
Reference in New Issue
Block a user