From 99b97ffeb4ab8ab52c816171038d47baeec48ff8 Mon Sep 17 00:00:00 2001 From: "chunmao.guo" Date: Wed, 21 Dec 2022 09:55:20 +0800 Subject: [PATCH] FIX: [STUDIO-1842] format wiki url's anchor Change-Id: Ifb8f73a1674aecaaad5ef5e7248a142e8a0f0146 --- src/slic3r/GUI/OptionsGroup.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index d8c71cfd9..11f043d5e 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -1221,7 +1221,15 @@ void ExtruderOptionsGroup::on_change_OG(const t_config_option_key& opt_id, const wxString OptionsGroup::get_url(const std::string& path_end) { //BBS - return wxString::Format(L"https://wiki.bambulab.com/%s/software/bambu-studio/%s", L"en", from_u8(path_end)); + wxString str = from_u8(path_end); + auto pos = str.find(L'#'); + if (pos != size_t(-1)) { + pos++; + wxString anchor = str.Mid(pos).Lower(); + anchor.Replace(L" ", "-"); + str = str.Left(pos) + anchor; + } + return wxString::Format(L"https://wiki.bambulab.com/%s/software/bambu-studio/%s", L"en", str); } bool OptionsGroup::launch_browser(const std::string& path_end)