ENH:not allowed to map to empty slots
jira:[STUDIO-9901] Change-Id: I98e2ad72b957bd6c42f6baa765a181aebaf81f1a
This commit is contained in:
parent
a3bed72e34
commit
be912aa84a
|
@ -406,6 +406,7 @@ void AmsMapingPopup::on_left_down(wxMouseEvent &evt)
|
|||
|
||||
if (pos.x > p_rect.x && pos.y > p_rect.y && pos.x < (p_rect.x + item->GetSize().x) && pos.y < (p_rect.y + item->GetSize().y)) {
|
||||
if (item->m_tray_data.type == TrayType::NORMAL && !is_match_material(item->m_tray_data.filament_type)) return;
|
||||
if (item->m_tray_data.type == TrayType::EMPTY) return;
|
||||
item->send_event(m_current_filament_id);
|
||||
Dismiss();
|
||||
}
|
||||
|
@ -610,6 +611,7 @@ void AmsMapingPopup::add_ams_mapping(std::vector<TrayData> tray_data, wxWindow*
|
|||
if (tray_data[i].type == EMPTY) {
|
||||
m_mapping_item->set_data(wxColour(0xCE, 0xCE, 0xCE), "-", tray_data[i]);
|
||||
m_mapping_item->Bind(wxEVT_LEFT_DOWN, [this, tray_data, i, m_mapping_item](wxMouseEvent &e) {
|
||||
return; //not allowed to map to empty slots
|
||||
m_mapping_item->send_event(m_current_filament_id);
|
||||
Dismiss();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue