mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 15:37:30 -06:00
ENH:display different thumbnails according to the printer type
Change-Id: I1534594923fdcafb231661a1a7fa289221277449
This commit is contained in:
parent
5139edb876
commit
b5e38e02fe
14 changed files with 474 additions and 387 deletions
|
@ -335,7 +335,15 @@ wxBitmap* BitmapCache::load_svg(const std::string &bitmap_name, unsigned target_
|
|||
//if (!new_color.empty())
|
||||
// replaces["\"#ED6B21\""] = "\"" + new_color + "\"";
|
||||
|
||||
NSVGimage *image = nsvgParseFromFileWithReplace(Slic3r::var(bitmap_name + ".svg").c_str(), "px", 96.0f, replaces);
|
||||
NSVGimage *image = nullptr;
|
||||
if (strstr(bitmap_name.c_str(), "printer_thumbnail") == NULL) {
|
||||
image = nsvgParseFromFileWithReplace(Slic3r::var(bitmap_name + ".svg").c_str(), "px", 96.0f, replaces);
|
||||
}
|
||||
else {
|
||||
std::map<std::string, std::string> temp_replaces;
|
||||
image = nsvgParseFromFileWithReplace(Slic3r::var(bitmap_name + ".svg").c_str(), "px", 96.0f, temp_replaces);
|
||||
}
|
||||
|
||||
if (image == nullptr)
|
||||
return nullptr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue