FIX: [STUDIO-3157] AMS material blacklist, prompt without translation

Change-Id: Id4ec08aea568680d2f08346bf18782830bebf205
This commit is contained in:
maosheng.wei 2023-06-14 10:24:39 +08:00 committed by Lane.Wei
parent 3dd15ee681
commit ca1facfaa0
27 changed files with 746 additions and 477 deletions

View file

@ -4792,6 +4792,14 @@ bool DeviceManager::load_filaments_blacklist_config(std::string config_file)
void DeviceManager::check_filaments_in_blacklist(std::string tag_vendor, std::string tag_type, bool& in_blacklist, std::string& ac, std::string& info)
{
std::unordered_map<std::string, wxString> blacklist_prompt =
{
{"TPU: not supported", _L("TPU is not supported by AMS.")},
{"Bambu PET-CF/PA6-CF: not supported", _L("Bambu PET-CF/PA6-CF is not supported by AMS.")},
{"PVA: flexible", _L("Damp PVA will become flexible and get stuck inside AMS,please take care to dry it before use.")},
{"CF/GF: hard and brittle", _L("CF/GF filaments are hard and brittle, It's easy to break or get stuck in AMS, please use with caution.")}
};
in_blacklist = false;
if (filaments_blacklist.contains("blacklist")) {
@ -4811,6 +4819,8 @@ void DeviceManager::check_filaments_in_blacklist(std::string tag_vendor, std::st
type = prohibited_filament["type"].get<std::string>();
action = prohibited_filament["action"].get<std::string>();
description = prohibited_filament["description"].get<std::string>();
description = blacklist_prompt[description].ToStdString();
}
else {
return;