From 4e1b105f17c1511865ca8ffbce2cf904ab61bdf8 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Wed, 1 May 2024 16:26:45 +0800 Subject: [PATCH] Fix a regression that cover image was missing --- src/slic3r/GUI/WebGuideDialog.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/WebGuideDialog.cpp b/src/slic3r/GUI/WebGuideDialog.cpp index d08092ecb6..fa5bd9f6ce 100644 --- a/src/slic3r/GUI/WebGuideDialog.cpp +++ b/src/slic3r/GUI/WebGuideDialog.cpp @@ -1476,7 +1476,13 @@ int GuideFrame::LoadProfileFamily(std::string strVendor, std::string strFilePath // wxString strCoverPath = wxString::Format("%s\\%s\\%s_cover.png", strFolder, strVendor, std::string(s1.mb_str())); std::string cover_file = s1 + "_cover.png"; - boost::filesystem::path cover_path = boost::filesystem::absolute(vendor_dir / cover_file).make_preferred(); + boost::filesystem::path cover_path = boost::filesystem::absolute(boost::filesystem::path(resources_dir()) / "/profiles/" / strVendor / cover_file).make_preferred(); + if (!boost::filesystem::exists(cover_path)) { + cover_path = + (boost::filesystem::absolute(boost::filesystem::path(resources_dir()) / "/web/image/printer/") / + cover_file) + .make_preferred(); + } OneModel["cover"] = cover_path.string(); OneModel["nozzle_selected"] = "";