mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-04 13:57:43 -07:00
ENH:fix mapping rules when printing from SD card
jira:[STUDIO-9699] Change-Id: I6019875b312cd29d20d69c876d195e5da1a88d18 (cherry picked from commit 062d4745dd9d19c62b618235ef819f247e538e68)
This commit is contained in:
parent
63a796e14a
commit
5eeea0beba
2 changed files with 13 additions and 5 deletions
|
|
@ -2313,7 +2313,7 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event)
|
|||
}
|
||||
|
||||
confirm_dlg.on_show();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this->on_send_print();
|
||||
|
|
@ -4185,7 +4185,6 @@ void SelectMachineDialog::set_default_from_sdcard()
|
|||
m_sizer_ams_mapping_right->Layout();
|
||||
m_filament_panel_right_sizer->Layout();
|
||||
m_filament_right_panel->Layout();
|
||||
m_mapping_popup.set_show_type(ShowType::LEFT_AND_RIGHT);
|
||||
|
||||
} else {
|
||||
m_filament_left_panel->Hide();
|
||||
|
|
@ -4194,7 +4193,6 @@ void SelectMachineDialog::set_default_from_sdcard()
|
|||
m_sizer_ams_mapping->SetCols(8);
|
||||
m_sizer_ams_mapping->Layout();
|
||||
m_filament_panel_sizer->Layout();
|
||||
m_mapping_popup.set_show_type(ShowType::RIGHT);
|
||||
}
|
||||
|
||||
//init MaterialItem
|
||||
|
|
@ -4237,7 +4235,7 @@ void SelectMachineDialog::set_default_from_sdcard()
|
|||
}
|
||||
|
||||
item->Bind(wxEVT_LEFT_UP, [this, item, materials](wxMouseEvent& e) {});
|
||||
item->Bind(wxEVT_LEFT_DOWN, [this, obj_, item, materials, fo](wxMouseEvent& e) {
|
||||
item->Bind(wxEVT_LEFT_DOWN, [this, obj_, item, materials, diameters_count, filament_map, fo](wxMouseEvent& e) {
|
||||
MaterialHash::iterator iter = m_materialList.begin();
|
||||
while (iter != m_materialList.end()) {
|
||||
int id = iter->first;
|
||||
|
|
@ -4263,6 +4261,16 @@ void SelectMachineDialog::set_default_from_sdcard()
|
|||
pos.y += item->GetRect().height;
|
||||
m_mapping_popup.Move(pos);
|
||||
|
||||
if (diameters_count > 1) {
|
||||
if (obj_ && can_hybrid_mapping(obj_->m_extder_data)) {
|
||||
m_mapping_popup.set_show_type(ShowType::LEFT_AND_RIGHT);
|
||||
} else if (filament_map[m_current_filament_id] == 1) {
|
||||
m_mapping_popup.set_show_type(ShowType::LEFT);
|
||||
} else if (filament_map[m_current_filament_id] == 2) {
|
||||
m_mapping_popup.set_show_type(ShowType::RIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
if (obj_ &&
|
||||
obj_->has_ams() &&
|
||||
(m_checkbox_list["use_ams"]->getValue() == "on") &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue