mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-13 12:07:41 +00:00
Fix: Could not load bitmap: printer_preview_ error causing crash on Linux (#12425)
Update Plater.cpp
This commit is contained in:
@@ -4030,6 +4030,8 @@ void Sidebar::update_printer_thumbnail()
|
|||||||
if (printer_thumbnails.find(printer_type) != printer_thumbnails.end()) // Use known cache first
|
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()));
|
p->image_printer->SetBitmap(create_scaled_bitmap(printer_thumbnails[printer_type], this, PRINTER_THUMBNAIL_SIZE.GetHeight()));
|
||||||
else {
|
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 {
|
try {
|
||||||
// No cache, try dedicated printer preview
|
// No cache, try dedicated printer preview
|
||||||
p->image_printer->SetBitmap(create_scaled_bitmap("printer_preview_" + printer_type, this, 48));
|
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;
|
printer_thumbnails[printer_type] = "printer_preview_" + printer_type;
|
||||||
return;
|
return;
|
||||||
} catch (...) {}
|
} catch (...) {}
|
||||||
|
*/
|
||||||
|
|
||||||
// Orca: try to use the printer model cover as the thumbnail
|
// Orca: try to use the printer model cover as the thumbnail
|
||||||
const auto model_name = selected_preset.config.opt_string("printer_model");
|
const auto model_name = selected_preset.config.opt_string("printer_model");
|
||||||
|
|||||||
Reference in New Issue
Block a user