Use calibration tutorial gitee mirror for China users

This commit is contained in:
Noisyfox 2023-10-08 22:30:13 +08:00
parent 8adb044670
commit 0694863fb9

View file

@ -2757,7 +2757,14 @@ void MainFrame::init_menubar_as_editor()
// help
append_menu_item(m_topbar->GetCalibMenu(), wxID_ANY, _L("Tutorial"), _L("Calibration help"),
[this](wxCommandEvent&) { wxLaunchDefaultBrowser("https://github.com/SoftFever/OrcaSlicer/wiki/Calibration", wxBROWSER_NEW_WINDOW); }, "", nullptr,
[this](wxCommandEvent&) {
std::string url = "https://github.com/SoftFever/OrcaSlicer/wiki/Calibration";
if (const std::string country_code = wxGetApp().app_config->get_country_code(); country_code == "CN") {
// Use gitee mirror for China users
url = "https://gitee.com/n0isyfox/orca-slicer-docs/wikis/%E6%A0%A1%E5%87%86/%E6%89%93%E5%8D%B0%E5%8F%82%E6%95%B0%E6%A0%A1%E5%87%86";
}
wxLaunchDefaultBrowser(url, wxBROWSER_NEW_WINDOW);
}, "", nullptr,
[this]() {return m_plater->is_view3D_shown();; }, this);
#else