mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 15:37:30 -06:00
FIX:fixed amsdata not sync after changed ams
Change-Id: If1c087c42258897fec7df5d44ff039bb0eec3b25
This commit is contained in:
parent
5444f69fc2
commit
459fe36235
2 changed files with 20 additions and 3 deletions
|
@ -379,15 +379,19 @@ void MachineInfoPanel::update_ams(MachineObject *obj)
|
||||||
|
|
||||||
|
|
||||||
auto it = ver_list.find(atoi(iter->first.c_str()));
|
auto it = ver_list.find(atoi(iter->first.c_str()));
|
||||||
|
auto ams_id = std::stoi(iter->second->id);
|
||||||
|
|
||||||
|
|
||||||
if (it == ver_list.end()) {
|
if (it == ver_list.end()) {
|
||||||
// hide this ams
|
// hide this ams
|
||||||
wxString ams_text = wxString::Format("AMS%s", std::to_string(ams_index + 1));
|
wxString ams_text = wxString::Format("AMS%s", std::to_string(ams_id + 1));
|
||||||
|
|
||||||
ams_name = ams_text;
|
ams_name = ams_text;
|
||||||
ams_sn = "-";
|
ams_sn = "-";
|
||||||
ams_ver = "-";
|
ams_ver = "-";
|
||||||
} else {
|
} else {
|
||||||
// update ams img
|
// update ams img
|
||||||
wxString ams_text = wxString::Format("AMS%s", std::to_string(ams_index + 1));
|
wxString ams_text = wxString::Format("AMS%s", std::to_string(ams_id + 1));
|
||||||
ams_name = ams_text;
|
ams_name = ams_text;
|
||||||
|
|
||||||
std::string ams_id = "ams/" + std::to_string(ams_index);
|
std::string ams_id = "ams/" + std::to_string(ams_index);
|
||||||
|
|
|
@ -1747,7 +1747,20 @@ void AMSControl::CreateAms()
|
||||||
|
|
||||||
void AMSControl::Reset()
|
void AMSControl::Reset()
|
||||||
{
|
{
|
||||||
m_current_ams = "";
|
auto caninfo0_0 = Caninfo{"def_can_0", L(""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
|
||||||
|
auto caninfo0_1 = Caninfo{"def_can_1", L(""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
|
||||||
|
auto caninfo0_2 = Caninfo{"def_can_2", L(""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
|
||||||
|
auto caninfo0_3 = Caninfo{"def_can_3", L(""), *wxWHITE, AMSCanType::AMS_CAN_TYPE_NONE};
|
||||||
|
|
||||||
|
AMSinfo ams1 = AMSinfo{"def_ams_0", std::vector<Caninfo>{caninfo0_0, caninfo0_1, caninfo0_2, caninfo0_3}};
|
||||||
|
AMSinfo ams2 = AMSinfo{"def_ams_1", std::vector<Caninfo>{caninfo0_0, caninfo0_1, caninfo0_2, caninfo0_3}};
|
||||||
|
AMSinfo ams3 = AMSinfo{"def_ams_2", std::vector<Caninfo>{caninfo0_0, caninfo0_1, caninfo0_2, caninfo0_3}};
|
||||||
|
AMSinfo ams4 = AMSinfo{"def_ams_3", std::vector<Caninfo>{caninfo0_0, caninfo0_1, caninfo0_2, caninfo0_3}};
|
||||||
|
|
||||||
|
std::vector<AMSinfo> ams_info{ams1, ams2, ams3, ams4};
|
||||||
|
std::vector<AMSinfo>::iterator it;
|
||||||
|
UpdateAms(ams_info, false);
|
||||||
|
m_current_ams = "";
|
||||||
m_current_senect = "";
|
m_current_senect = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue