mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-24 06:20:30 -05:00
ENH:display different thumbnails according to the printer type
Change-Id: I1534594923fdcafb231661a1a7fa289221277449
This commit is contained in:
1 parent
5139edb876
commit
b5e38e02fe
14 files changed
+474
-387
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user