profile cover image reorg

This commit is contained in:
SoftFever 2023-05-07 23:47:21 +08:00
parent c9b20a0e10
commit c81ca8c9d7
62 changed files with 10 additions and 4 deletions

View file

@ -1354,7 +1354,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"] = "";