From b7a11fb768290441e6ac4bcdbc96fd9666865131 Mon Sep 17 00:00:00 2001 From: "zorro.zhang" Date: Wed, 5 Jul 2023 18:52:04 +0800 Subject: [PATCH] FIX: just load json profile Change-Id: I15c54f67a7680e643b9d21a4facb9365ef08fe72 (cherry picked from commit e2f862b462445d0eeb69c99525a07db9d67d0a6f) --- src/slic3r/GUI/WebGuideDialog.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/WebGuideDialog.cpp b/src/slic3r/GUI/WebGuideDialog.cpp index ae2b3ad30..da8edef9b 100644 --- a/src/slic3r/GUI/WebGuideDialog.cpp +++ b/src/slic3r/GUI/WebGuideDialog.cpp @@ -1006,11 +1006,13 @@ int GuideFrame::LoadProfile() } else { //cout << "is a file" << endl; //cout << iter->path().string() << endl; + wxString strVendor = from_u8(iter->path().string()).BeforeLast('.'); strVendor = strVendor.AfterLast( '\\'); strVendor = strVendor.AfterLast('\/'); + wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower(); - if (w2s(strVendor) == PresetBundle::BBL_BUNDLE) + if (w2s(strVendor) == PresetBundle::BBL_BUNDLE && strExtension.CmpNoCase("json") == 0) LoadProfileFamily(w2s(strVendor), iter->path().string()); } } @@ -1027,8 +1029,9 @@ int GuideFrame::LoadProfile() wxString strVendor = from_u8(iter->path().string()).BeforeLast('.'); strVendor = strVendor.AfterLast( '\\'); strVendor = strVendor.AfterLast('\/'); + wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower(); - if (w2s(strVendor) != PresetBundle::BBL_BUNDLE) + if (w2s(strVendor) != PresetBundle::BBL_BUNDLE && strExtension.CmpNoCase("json")==0) LoadProfileFamily(w2s(strVendor), iter->path().string()); } }