ENH:multiple printers mgr support the new protocol version
jira:[none] Change-Id: Iee89fcf3e945e3507ec773b7ae70a61968fbe9ef
This commit is contained in:
parent
106d9865c3
commit
7395bbb457
|
@ -31,6 +31,27 @@ namespace Slic3r { namespace GUI {
|
|||
|
||||
wxDEFINE_EVENT(EVT_SET_FINISH_MAPPING, wxCommandEvent);
|
||||
const int LEFT_OFFSET = 2;
|
||||
|
||||
static void _add_containers(const AmsMapingPopup * win,
|
||||
std::list<MappingContainer *> & one_slot_containers,
|
||||
const std::vector<MappingContainer *> &four_slots_containers,
|
||||
wxBoxSizer * target_sizer)
|
||||
{
|
||||
for (auto container : four_slots_containers) { target_sizer->Add(container, 0, wxTOP, win->FromDIP(5)); }
|
||||
|
||||
while (!one_slot_containers.empty()) {
|
||||
wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (one_slot_containers.empty()) { break; }
|
||||
|
||||
sizer->Add(one_slot_containers.front(), 0, wxLEFT, (i == 0) ? 0 : win->FromDIP(5));
|
||||
one_slot_containers.pop_front();
|
||||
}
|
||||
|
||||
target_sizer->Add(sizer, 0, wxTOP, win->FromDIP(5));
|
||||
}
|
||||
}
|
||||
|
||||
MaterialItem::MaterialItem(wxWindow *parent, wxColour mcolour, wxString mname)
|
||||
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize)
|
||||
{
|
||||
|
@ -827,26 +848,9 @@ void AmsMapingPopup::on_left_down(wxMouseEvent &evt)
|
|||
|
||||
void AmsMapingPopup::update_ams_data_multi_machines()
|
||||
{
|
||||
m_has_unmatch_filament = false;
|
||||
for (auto& ams_container : m_amsmapping_container_list) {
|
||||
ams_container->Hide();
|
||||
}
|
||||
m_mapping_from_multi_machines = true;
|
||||
|
||||
for (wxWindow* mitem : m_mapping_item_list) {
|
||||
mitem->Destroy();
|
||||
mitem = nullptr;
|
||||
}
|
||||
m_mapping_item_list.clear();
|
||||
|
||||
if (m_amsmapping_container_sizer_list.size() > 0) {
|
||||
for (wxBoxSizer* siz : m_amsmapping_container_sizer_list) {
|
||||
siz->Clear(true);
|
||||
}
|
||||
}
|
||||
|
||||
int m_amsmapping_container_list_index = 0;
|
||||
std::vector<TrayData> tray_datas;
|
||||
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
TrayData td;
|
||||
td.id = i;
|
||||
|
@ -858,12 +862,91 @@ void AmsMapingPopup::update_ams_data_multi_machines()
|
|||
tray_datas.push_back(td);
|
||||
}
|
||||
|
||||
m_ams_remain_detect_flag = false;
|
||||
|
||||
if (m_amsmapping_container_list.size() > m_amsmapping_container_list_index ) {
|
||||
m_amsmapping_container_list[m_amsmapping_container_list_index]->Show();
|
||||
add_ams_mapping(tray_datas, m_ams_remain_detect_flag, m_amsmapping_container_list[m_amsmapping_container_list_index], m_amsmapping_container_sizer_list[m_amsmapping_container_list_index]);
|
||||
for (auto& ams_container : m_amsmapping_container_list) {
|
||||
ams_container->Destroy();
|
||||
}
|
||||
|
||||
m_amsmapping_container_list.clear();
|
||||
m_amsmapping_container_sizer_list.clear();
|
||||
m_mapping_item_list.clear();
|
||||
|
||||
if (wxGetApp().dark_mode() && m_reset_btn->GetName() != "erase_dark") {
|
||||
m_reset_btn->SetName("erase_dark");
|
||||
m_reset_btn->SetBitmap(ScalableBitmap(m_right_first_text_panel, "erase_dark", 14).bmp());
|
||||
}
|
||||
else if (!wxGetApp().dark_mode() && m_reset_btn->GetName() != "erase") {
|
||||
m_reset_btn->SetName("erase");
|
||||
m_reset_btn->SetBitmap(ScalableBitmap(m_right_first_text_panel, "erase", 14).bmp());
|
||||
}
|
||||
|
||||
size_t nozzle_nums = 1;
|
||||
m_show_type = ShowType::RIGHT;
|
||||
|
||||
m_left_marea_panel->Hide();
|
||||
m_left_extra_slot->Hide();
|
||||
// m_left_marea_panel->Show();
|
||||
m_right_marea_panel->Show();
|
||||
set_sizer_title(m_right_split_ams_sizer, _L("AMS"));
|
||||
m_right_tips->SetLabel(m_single_tip_text);
|
||||
m_right_extra_slot->Hide();
|
||||
m_left_extra_slot->Hide();
|
||||
|
||||
|
||||
if (!m_only_show_ext_spool) {
|
||||
/*ams*/
|
||||
bool has_left_ams = false, has_right_ams = false;
|
||||
std::list<MappingContainer *> left_one_slot_containers;
|
||||
std::list<MappingContainer *> right_one_slot_containers;
|
||||
std::vector<MappingContainer *> left_four_slots_containers;
|
||||
std::vector<MappingContainer *> right_four_slot_containers;
|
||||
for (int i = 0; i < 1; i++) {
|
||||
int ams_indx = 0;
|
||||
int ams_type = 1;
|
||||
int nozzle_id = 0;
|
||||
|
||||
if (ams_type >= 1 || ams_type <= 3) { // 1:ams 2:ams-lite 3:n3f
|
||||
|
||||
auto sizer_mapping_list = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto ams_mapping_item_container = new MappingContainer(nozzle_id == 0 ? m_right_marea_panel : m_left_marea_panel, "AMS-1", 4);
|
||||
ams_mapping_item_container->SetName(nozzle_id == 0 ? m_right_marea_panel->GetName() : m_left_marea_panel->GetName());
|
||||
ams_mapping_item_container->SetSizer(sizer_mapping_list);
|
||||
ams_mapping_item_container->Layout();
|
||||
|
||||
m_has_unmatch_filament = false;
|
||||
ams_mapping_item_container->Show();
|
||||
add_ams_mapping(tray_datas, false, ams_mapping_item_container, sizer_mapping_list);
|
||||
m_amsmapping_container_sizer_list.push_back(sizer_mapping_list);
|
||||
m_amsmapping_container_list.push_back(ams_mapping_item_container);
|
||||
|
||||
if (nozzle_id == 0) {
|
||||
has_right_ams = true;
|
||||
if (ams_mapping_item_container->get_slots_num() == 1) {
|
||||
right_one_slot_containers.push_back(ams_mapping_item_container);
|
||||
} else {
|
||||
right_four_slot_containers.push_back(ams_mapping_item_container);
|
||||
}
|
||||
} else if (nozzle_id == 1) {
|
||||
has_left_ams = true;
|
||||
if (ams_mapping_item_container->get_slots_num() == 1) {
|
||||
left_one_slot_containers.push_back(ams_mapping_item_container);
|
||||
} else {
|
||||
left_four_slots_containers.push_back(ams_mapping_item_container);
|
||||
}
|
||||
}
|
||||
} else if (ams_type == 4) { // 4:n3s
|
||||
}
|
||||
}
|
||||
|
||||
_add_containers(this, left_one_slot_containers, left_four_slots_containers, m_sizer_ams_basket_left);
|
||||
_add_containers(this, right_one_slot_containers, right_four_slot_containers, m_sizer_ams_basket_right);
|
||||
m_left_split_ams_sizer->Show(has_left_ams);
|
||||
m_right_split_ams_sizer->Show(has_right_ams);
|
||||
//update_items_check_state(ams_mapping_result);
|
||||
} else {
|
||||
m_right_split_ams_sizer->Show(false);
|
||||
}
|
||||
Layout();
|
||||
Fit();
|
||||
}
|
||||
|
@ -929,35 +1012,6 @@ void AmsMapingPopup::update_items_check_state(const std::vector<FilamentInfo>& a
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_add_containers(const AmsMapingPopup* win,
|
||||
std::list<MappingContainer*>& one_slot_containers,
|
||||
const std::vector<MappingContainer*>& four_slots_containers,
|
||||
wxBoxSizer* target_sizer)
|
||||
{
|
||||
for (auto container : four_slots_containers)
|
||||
{
|
||||
target_sizer->Add(container, 0, wxTOP, win->FromDIP(5));
|
||||
}
|
||||
|
||||
while (!one_slot_containers.empty())
|
||||
{
|
||||
wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (one_slot_containers.empty())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
sizer->Add(one_slot_containers.front(), 0, wxLEFT, (i == 0) ? 0 : win->FromDIP(5));
|
||||
one_slot_containers.pop_front();
|
||||
}
|
||||
|
||||
target_sizer->Add(sizer, 0, wxTOP, win->FromDIP(5));
|
||||
}
|
||||
}
|
||||
|
||||
void AmsMapingPopup::update(MachineObject* obj, const std::vector<FilamentInfo>& ams_mapping_result)
|
||||
{
|
||||
//BOOST_LOG_TRIVIAL(info) << "ams_mapping nozzle count " << obj->m_extder_data.nozzle.size();
|
||||
|
@ -1257,7 +1311,12 @@ void AmsMapingPopup::add_ams_mapping(std::vector<TrayData> tray_data, bool remai
|
|||
if (tray_data[i].type == EMPTY) {
|
||||
m_mapping_item->set_data(wxColour(0xCE, 0xCE, 0xCE), "-", remain_detect_flag, 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
|
||||
|
||||
if (!m_mapping_from_multi_machines) {
|
||||
return;
|
||||
}
|
||||
|
||||
//not allowed to map to empty slots
|
||||
m_mapping_item->send_event(m_current_filament_id);
|
||||
Dismiss();
|
||||
});
|
||||
|
|
|
@ -253,6 +253,7 @@ public:
|
|||
wxString m_right_tip_text;
|
||||
wxBoxSizer* m_sizer_split_ams_left;
|
||||
wxBoxSizer* m_sizer_split_ams_right;
|
||||
bool m_mapping_from_multi_machines {false};
|
||||
|
||||
void set_sizer_title(wxBoxSizer *sizer, wxString text);
|
||||
wxBoxSizer* create_split_sizer(wxWindow* parent, wxString text);
|
||||
|
|
|
@ -510,9 +510,11 @@ BBL::PrintParams SendMultiMachinePage::request_params(MachineObject* obj)
|
|||
|
||||
if (use_ams) {
|
||||
std::string ams_array;
|
||||
std::string ams_array2;
|
||||
std::string mapping_info;
|
||||
get_ams_mapping_result(ams_array, mapping_info);
|
||||
get_ams_mapping_result(ams_array, ams_array2, mapping_info);
|
||||
params.ams_mapping = ams_array;
|
||||
params.ams_mapping2 = ams_array2;
|
||||
params.ams_mapping_info = mapping_info;
|
||||
}
|
||||
else {
|
||||
|
@ -582,13 +584,12 @@ BBL::PrintParams SendMultiMachinePage::request_params(MachineObject* obj)
|
|||
return params;
|
||||
}
|
||||
|
||||
bool SendMultiMachinePage::get_ams_mapping_result(std::string& mapping_array_str, std::string& ams_mapping_info)
|
||||
bool SendMultiMachinePage::get_ams_mapping_result(std::string &mapping_array_str, std::string &mapping_array_str2, std::string &ams_mapping_info)
|
||||
{
|
||||
if (m_ams_mapping_result.empty())
|
||||
return false;
|
||||
if (m_ams_mapping_result.empty()) return false;
|
||||
|
||||
bool valid_mapping_result = true;
|
||||
int invalid_count = 0;
|
||||
int invalid_count = 0;
|
||||
for (int i = 0; i < m_ams_mapping_result.size(); i++) {
|
||||
if (m_ams_mapping_result[i].tray_id == -1) {
|
||||
valid_mapping_result = false;
|
||||
|
@ -598,38 +599,72 @@ bool SendMultiMachinePage::get_ams_mapping_result(std::string& mapping_array_str
|
|||
|
||||
if (invalid_count == m_ams_mapping_result.size()) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
json j = json::array();
|
||||
} else {
|
||||
json mapping_v0_json = json::array();
|
||||
json mapping_v1_json = json::array();
|
||||
json mapping_info_json = json::array();
|
||||
|
||||
for (int i = 0; i < wxGetApp().preset_bundle->filament_presets.size(); i++) {
|
||||
int tray_id = -1;
|
||||
json mapping_item;
|
||||
mapping_item["ams"] = tray_id;
|
||||
mapping_item["targetColor"] = "";
|
||||
mapping_item["filamentId"] = "";
|
||||
mapping_item["filamentType"] = "";
|
||||
/* get filament maps */
|
||||
std::vector<int> filament_maps;
|
||||
Plater * plater = wxGetApp().plater();
|
||||
if (plater) {
|
||||
PartPlate *curr_plate = plater->get_partplate_list().get_curr_plate();
|
||||
if (curr_plate) {
|
||||
filament_maps = curr_plate->get_filament_maps();
|
||||
} else {
|
||||
BOOST_LOG_TRIVIAL(error) << "get_ams_mapping_result, curr_plate is nullptr";
|
||||
}
|
||||
} else {
|
||||
BOOST_LOG_TRIVIAL(error) << "get_ams_mapping_result, plater is nullptr";
|
||||
}
|
||||
|
||||
for (int i = 0; i < wxGetApp().preset_bundle->filament_presets.size(); i++) {
|
||||
int tray_id = -1;
|
||||
json mapping_item_v1;
|
||||
mapping_item_v1["ams_id"] = 0xff;
|
||||
mapping_item_v1["slot_id"] = 0xff;
|
||||
json mapping_item;
|
||||
mapping_item["ams"] = tray_id;
|
||||
mapping_item["targetColor"] = "";
|
||||
mapping_item["filamentId"] = "";
|
||||
mapping_item["filamentType"] = "";
|
||||
for (int k = 0; k < m_ams_mapping_result.size(); k++) {
|
||||
if (m_ams_mapping_result[k].id == i) {
|
||||
tray_id = m_ams_mapping_result[k].tray_id;
|
||||
mapping_item["ams"] = tray_id;
|
||||
tray_id = m_ams_mapping_result[k].tray_id;
|
||||
mapping_item["ams"] = tray_id;
|
||||
mapping_item["filamentType"] = m_filaments[k].type;
|
||||
auto it = wxGetApp().preset_bundle->filaments.find_preset(wxGetApp().preset_bundle->filament_presets[i]);
|
||||
if (it != nullptr) {
|
||||
mapping_item["filamentId"] = it->filament_id;
|
||||
if (i >= 0 && i < wxGetApp().preset_bundle->filament_presets.size()) {
|
||||
auto it = wxGetApp().preset_bundle->filaments.find_preset(wxGetApp().preset_bundle->filament_presets[i]);
|
||||
if (it != nullptr) { mapping_item["filamentId"] = it->filament_id; }
|
||||
}
|
||||
//convert #RRGGBB to RRGGBBAA
|
||||
/* nozzle id */
|
||||
mapping_item["nozzleId"] = 0;
|
||||
|
||||
// convert #RRGGBB to RRGGBBAA
|
||||
mapping_item["sourceColor"] = m_filaments[k].color;
|
||||
mapping_item["targetColor"] = m_ams_mapping_result[k].color;
|
||||
if (tray_id == VIRTUAL_TRAY_MAIN_ID || tray_id == VIRTUAL_TRAY_DEPUTY_ID) { tray_id = -1; }
|
||||
|
||||
/*new ams mapping data*/
|
||||
try {
|
||||
if (m_ams_mapping_result[k].ams_id.empty() || m_ams_mapping_result[k].slot_id.empty()) { // invalid case
|
||||
mapping_item_v1["ams_id"] = VIRTUAL_TRAY_MAIN_ID;
|
||||
mapping_item_v1["slot_id"] = VIRTUAL_TRAY_MAIN_ID;
|
||||
} else {
|
||||
mapping_item_v1["ams_id"] = std::stoi(m_ams_mapping_result[k].ams_id);
|
||||
mapping_item_v1["slot_id"] = std::stoi(m_ams_mapping_result[k].slot_id);
|
||||
}
|
||||
} catch (...) {}
|
||||
}
|
||||
}
|
||||
j.push_back(tray_id);
|
||||
mapping_v0_json.push_back(tray_id);
|
||||
mapping_v1_json.push_back(mapping_item_v1);
|
||||
mapping_info_json.push_back(mapping_item);
|
||||
}
|
||||
mapping_array_str = j.dump();
|
||||
ams_mapping_info = mapping_info_json.dump();
|
||||
|
||||
mapping_array_str = mapping_v0_json.dump();
|
||||
mapping_array_str2 = mapping_v1_json.dump();
|
||||
ams_mapping_info = mapping_info_json.dump();
|
||||
return valid_mapping_result;
|
||||
}
|
||||
return true;
|
||||
|
@ -881,16 +916,33 @@ void SendMultiMachinePage::OnSelectRadio(wxMouseEvent& event)
|
|||
AmsRadioSelectorList::Node* node = m_radio_group.GetFirst();
|
||||
auto groupid = 0;
|
||||
|
||||
while (node) {
|
||||
AmsRadioSelector* rs = node->GetData();
|
||||
if (rs->m_radiobox->GetId() == event.GetId()) groupid = rs->m_groupid;
|
||||
node = node->GetNext();
|
||||
}
|
||||
//while (node) {
|
||||
// AmsRadioSelector* rs = node->GetData();
|
||||
// if (rs->m_radiobox->GetId() == event.GetId()) groupid = rs->m_groupid;
|
||||
// node = node->GetNext();
|
||||
//}
|
||||
|
||||
node = m_radio_group.GetFirst();
|
||||
while (node) {
|
||||
AmsRadioSelector* rs = node->GetData();
|
||||
if (rs->m_groupid == groupid && rs->m_radiobox->GetId() == event.GetId()) rs->m_radiobox->SetValue(true);
|
||||
AmsRadioSelector *rs = node->GetData();
|
||||
if (rs->m_groupid == groupid && rs->m_radiobox->GetId() == event.GetId()) {
|
||||
rs->m_radiobox->SetValue(true);
|
||||
if (rs->m_param_name == "use_external") {
|
||||
MaterialHash::iterator iter = m_material_list.begin();
|
||||
while (iter != m_material_list.end()) {
|
||||
Material * item = iter->second;
|
||||
MaterialItem *m = item->item;
|
||||
if (item->id == m_current_filament_id) { m->set_ams_info(wxColour("#CECECE"), "Ext", 0, std::vector<wxColour>()); }
|
||||
iter++;
|
||||
}
|
||||
} else if (rs->m_param_name == "use_ams") {
|
||||
m_current_filament_id = 1;
|
||||
wxCommandEvent event(EVT_SET_FINISH_MAPPING);
|
||||
event.SetInt(0);
|
||||
event.SetString("206|206|206|255|A1|1|0|0");
|
||||
wxPostEvent(this, event);
|
||||
}
|
||||
}
|
||||
if (rs->m_groupid == groupid && rs->m_radiobox->GetId() != event.GetId()) rs->m_radiobox->SetValue(false);
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
@ -936,7 +988,7 @@ void SendMultiMachinePage::on_set_finish_mapping(wxCommandEvent& evt)
|
|||
|
||||
BOOST_LOG_TRIVIAL(info) << "The ams mapping selection result: data is " << selection_data;
|
||||
|
||||
if (selection_data_arr.size() == 6) {
|
||||
if (selection_data_arr.size() == 8) {
|
||||
auto ams_colour = wxColour(wxAtoi(selection_data_arr[0]), wxAtoi(selection_data_arr[1]), wxAtoi(selection_data_arr[2]), wxAtoi(selection_data_arr[3]));
|
||||
int old_filament_id = (int)wxAtoi(selection_data_arr[5]);
|
||||
|
||||
|
@ -958,11 +1010,14 @@ void SendMultiMachinePage::on_set_finish_mapping(wxCommandEvent& evt)
|
|||
for (auto i = 0; i < m_ams_mapping_result.size(); i++) {
|
||||
if (m_ams_mapping_result[i].id == wxAtoi(selection_data_arr[5])) {
|
||||
m_ams_mapping_result[i].tray_id = evt.GetInt();
|
||||
auto ams_colour = wxColour(wxAtoi(selection_data_arr[0]), wxAtoi(selection_data_arr[1]), wxAtoi(selection_data_arr[2]), wxAtoi(selection_data_arr[3]));
|
||||
wxString color = wxString::Format("#%02X%02X%02X%02X", ams_colour.Red(), ams_colour.Green(), ams_colour.Blue(), ams_colour.Alpha());
|
||||
m_ams_mapping_result[i].color = color.ToStdString();
|
||||
m_ams_mapping_result[i].ctype = ctype;
|
||||
auto ams_colour = wxColour(wxAtoi(selection_data_arr[0]), wxAtoi(selection_data_arr[1]), wxAtoi(selection_data_arr[2]), wxAtoi(selection_data_arr[3]));
|
||||
wxString color = wxString::Format("#%02X%02X%02X%02X", ams_colour.Red(), ams_colour.Green(), ams_colour.Blue(), ams_colour.Alpha());
|
||||
m_ams_mapping_result[i].color = color.ToStdString();
|
||||
m_ams_mapping_result[i].ctype = ctype;
|
||||
m_ams_mapping_result[i].colors = tray_cols;
|
||||
|
||||
m_ams_mapping_result[i].ams_id = selection_data_arr[6].ToStdString();
|
||||
m_ams_mapping_result[i].slot_id = selection_data_arr[7].ToStdString();
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(trace) << "The ams mapping result: id is " << m_ams_mapping_result[i].id << "tray_id is " << m_ams_mapping_result[i].tray_id;
|
||||
}
|
||||
|
@ -1099,9 +1154,9 @@ wxPanel* SendMultiMachinePage::create_page()
|
|||
wxBoxSizer* title_filament = create_item_title(_L("Filament"), main_page, "");
|
||||
wxBoxSizer* radio_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
wxBoxSizer* use_external_sizer = create_item_radiobox(_L("Use External Spool"), main_page, "", 0, "use_external");
|
||||
//wxBoxSizer* use_ams_sizer = create_item_radiobox(_L("Use AMS"), main_page, "", 0, "use_ams");
|
||||
wxBoxSizer* use_ams_sizer = create_item_radiobox(_L("Use AMS"), main_page, "", 0, "use_ams");
|
||||
radio_sizer->Add(use_external_sizer, 0, wxLeft, FromDIP(20));
|
||||
//radio_sizer->Add(use_ams_sizer, 0, wxLeft, FromDIP(5));
|
||||
radio_sizer->Add(use_ams_sizer, 0, wxLeft, FromDIP(5));
|
||||
sizer->Add(title_filament, 0, wxEXPAND, 0);
|
||||
sizer->Add(radio_sizer, 0, wxLEFT, FromDIP(20));
|
||||
sizer->AddSpacer(FromDIP(5));
|
||||
|
@ -1109,7 +1164,7 @@ wxPanel* SendMultiMachinePage::create_page()
|
|||
|
||||
// add ams item
|
||||
m_ams_list_sizer = new wxGridSizer(0, 4, 0, FromDIP(5));
|
||||
//sync_ams_list();
|
||||
sync_ams_list();
|
||||
sizer->Add(m_ams_list_sizer, 0, wxLEFT, FromDIP(25));
|
||||
sizer->AddSpacer(FromDIP(10));
|
||||
|
||||
|
@ -1437,6 +1492,7 @@ void SendMultiMachinePage::sync_ams_list()
|
|||
wxPoint pos = item->ClientToScreen(wxPoint(0, 0));
|
||||
pos.y += item->GetRect().height;
|
||||
m_mapping_popup->Move(pos);
|
||||
m_mapping_popup->set_send_win(this);
|
||||
m_mapping_popup->set_parent_item(item);
|
||||
m_mapping_popup->set_current_filament_id(extruder);
|
||||
m_mapping_popup->set_tag_texture(materials[extruder]);
|
||||
|
|
|
@ -106,7 +106,7 @@ private:
|
|||
wxBoxSizer* m_sizer_body{ nullptr };
|
||||
wxGridSizer* m_ams_list_sizer{ nullptr };
|
||||
AmsMapingPopup* m_mapping_popup{ nullptr };
|
||||
|
||||
|
||||
AmsRadioSelectorList m_radio_group;
|
||||
MaterialHash m_material_list;
|
||||
std::map<std::string, CheckBox*> m_checkbox_map;
|
||||
|
@ -172,7 +172,7 @@ public:
|
|||
|
||||
BBL::PrintParams request_params(MachineObject* obj);
|
||||
|
||||
bool get_ams_mapping_result(std::string& mapping_array_str, std::string& ams_mapping_info);
|
||||
bool get_ams_mapping_result(std::string &mapping_array_str, std::string &mapping_array_str2, std::string &ams_mapping_info);
|
||||
wxBoxSizer* create_item_title(wxString title, wxWindow* parent, wxString tooltip);
|
||||
wxBoxSizer* create_item_checkbox(wxString title, wxWindow* parent, wxString tooltip, int padding_left, std::string param);
|
||||
wxBoxSizer* create_item_input(wxString str_before, wxString str_after, wxWindow* parent, wxString tooltip, std::string param);
|
||||
|
|
Loading…
Reference in New Issue