Fix: Could not load bitmap: printer_preview_ error causing crash on Linux (#12425)

Update Plater.cpp
This commit is contained in:
yw4z
2026-04-24 09:06:16 +03:00
committed by GitHub
parent f1cacd89c0
commit f9f5425a33

View File

@@ -4030,6 +4030,8 @@ void Sidebar::update_printer_thumbnail()
if (printer_thumbnails.find(printer_type) != printer_thumbnails.end()) // Use known cache first
p->image_printer->SetBitmap(create_scaled_bitmap(printer_thumbnails[printer_type], this, PRINTER_THUMBNAIL_SIZE.GetHeight()));
else {
/* ORCA this part check images folder for BBL covers but not checks file existence and causes crash on Linux
* BBL covers already exist on profile folder so no need to use this section
try {
// No cache, try dedicated printer preview
p->image_printer->SetBitmap(create_scaled_bitmap("printer_preview_" + printer_type, this, 48));
@@ -4037,6 +4039,7 @@ void Sidebar::update_printer_thumbnail()
printer_thumbnails[printer_type] = "printer_preview_" + printer_type;
return;
} catch (...) {}
*/
// Orca: try to use the printer model cover as the thumbnail
const auto model_name = selected_preset.config.opt_string("printer_model");