mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-03-14 15:26:11 -06:00
FIX:use ui_and_3d_volume_map to change filament
for cut and text object jira:github 5195 Change-Id: I17cd57fef0e4882167643174ae2ba36023cbe349 (cherry picked from commit f7e49a3846ee9887924b777f5b2cb154d1b5cc1f)
This commit is contained in:
parent
1ed2c423d6
commit
8e288051e3
1 changed files with 9 additions and 6 deletions
|
|
@ -1053,12 +1053,15 @@ void ObjectList::update_filament_in_config(const wxDataViewItem& item)
|
|||
}
|
||||
else {
|
||||
const int obj_idx = m_objects_model->GetIdByItem(m_objects_model->GetObject(item));
|
||||
if (item_type & itVolume)
|
||||
{
|
||||
const int volume_id = m_objects_model->GetVolumeIdByItem(item);
|
||||
if (obj_idx < 0 || volume_id < 0)
|
||||
return;
|
||||
m_config = &(*m_objects)[obj_idx]->volumes[volume_id]->config;
|
||||
if (item_type & itVolume){
|
||||
const int ui_volume_idx = m_objects_model->GetVolumeIdByItem(item);
|
||||
if (obj_idx < 0 || ui_volume_idx < 0)
|
||||
return;
|
||||
auto &ui_and_3d_volume_map = m_objects_model->get_ui_and_3d_volume_map();
|
||||
if (ui_and_3d_volume_map.find(ui_volume_idx) == ui_and_3d_volume_map.end()) {
|
||||
return;
|
||||
}
|
||||
m_config = &(*m_objects)[obj_idx]->volumes[ui_and_3d_volume_map[ui_volume_idx]]->config;
|
||||
}
|
||||
else if (item_type & itLayer)
|
||||
m_config = &get_item_config(item);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue