mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-31 20:02: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) {
|
if (!type_opt) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// printer_type is actually printer_name for now
|
||||||
if (auto pair = printer_type_and_name_table.find(*type_opt); pair != printer_type_and_name_table.end()) {
|
name = *type_opt;
|
||||||
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 should not appear twice
|
// printer should not appear twice
|
||||||
assert(new_printer_map.find(name) == new_printer_map.end());
|
assert(new_printer_map.find(name) == new_printer_map.end());
|
||||||
// prepare all states on 0
|
// prepare all states on 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user