ENH:display different thumbnails according to the printer type

Change-Id: I1534594923fdcafb231661a1a7fa289221277449
This commit is contained in:
tao wang authored and Lane.Wei committed 2022-12-15 04:38:15 -05:00
1 parent 5139edb876
commit b5e38e02fe
14 files changed
+474 -387

No files matched your search

+9 -1
View File
@@ -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;