mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 17:58:03 -06:00
FIX: big thumbnail send by multi-frame
Change-Id: Ia3a88fb53b8cc27d20fa976822c91c09b4442d71
This commit is contained in:
parent
86a7de4557
commit
fefd13a4ac
1 changed files with 4 additions and 1 deletions
|
@ -842,7 +842,7 @@ void PrinterFileSystem::UpdateFocusThumbnail2(std::shared_ptr<std::vector<File>>
|
||||||
file.path = path;
|
file.path = path;
|
||||||
return FILE_SIZE_ERR;
|
return FILE_SIZE_ERR;
|
||||||
}
|
}
|
||||||
auto n = file.path.find_last_of('#');
|
auto n = path.find_last_of('#');
|
||||||
auto path2 = n == std::string::npos ? path : path.substr(0, n);
|
auto path2 = n == std::string::npos ? path : path.substr(0, n);
|
||||||
auto iter = std::find_if(files->begin(), files->end(), [&path2](auto &f) { return f.path == path2; });
|
auto iter = std::find_if(files->begin(), files->end(), [&path2](auto &f) { return f.path == path2; });
|
||||||
if (cont) {
|
if (cont) {
|
||||||
|
@ -868,6 +868,9 @@ void PrinterFileSystem::UpdateFocusThumbnail2(std::shared_ptr<std::vector<File>>
|
||||||
wxMemoryInputStream mis(data, size);
|
wxMemoryInputStream mis(data, size);
|
||||||
mimetype.Replace("jpg", "jpeg");
|
mimetype.Replace("jpg", "jpeg");
|
||||||
file.thumbnail = wxImage(mis, mimetype);
|
file.thumbnail = wxImage(mis, mimetype);
|
||||||
|
if (!file.thumbnail.IsOk()) {
|
||||||
|
BOOST_LOG_TRIVIAL(info) << "PrinterFileSystem: parse thumbnail failed" << size << mimetype;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
file.name = thumbnail;
|
file.name = thumbnail;
|
||||||
file.path = path;
|
file.path = path;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue