mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-30 23:32:00 +08:00
Read printer_name from printer_type in printers states message
This commit is contained in:
parent
c669ef49aa
commit
600086df56
@ -206,14 +206,8 @@ bool UserAccount::on_connect_printers_success(const std::string& data, AppConfig
|
||||
if (!type_opt) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (auto pair = printer_type_and_name_table.find(*type_opt); pair != printer_type_and_name_table.end()) {
|
||||
name = pair->second;
|
||||
}
|
||||
else {
|
||||
assert(true); // On this assert, printer_type_and_name_table needs to be updated with type_string and correct printer name
|
||||
continue;
|
||||
}
|
||||
// printer_type is actually printer_name for now
|
||||
name = *type_opt;
|
||||
// printer should not appear twice
|
||||
assert(new_printer_map.find(name) == new_printer_map.end());
|
||||
// prepare all states on 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user