mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-12 21:49:05 +08:00
fix Calibration hyperlinks: open the os browser
supermerill/SuperSlicer#2005
This commit is contained in:
parent
daae6832a1
commit
5d622f6319
@ -65,6 +65,10 @@ void CalibrationAbstractDialog::create(boost::filesystem::path html_path, std::s
|
|||||||
html_viewer = new wxHtmlWindow(this, wxID_ANY,
|
html_viewer = new wxHtmlWindow(this, wxID_ANY,
|
||||||
wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO);
|
wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO);
|
||||||
html_viewer->LoadPage(GUI::from_u8(full_file_path.string()));
|
html_viewer->LoadPage(GUI::from_u8(full_file_path.string()));
|
||||||
|
// when using hyperlink, open the browser.
|
||||||
|
html_viewer->Bind(wxEVT_HTML_LINK_CLICKED, [this](wxHtmlLinkEvent& evt) {
|
||||||
|
wxLaunchDefaultBrowser(evt.GetLinkInfo().GetHref());
|
||||||
|
});
|
||||||
main_sizer->Add(html_viewer, 1, wxEXPAND | wxALL, 5);
|
main_sizer->Add(html_viewer, 1, wxEXPAND | wxALL, 5);
|
||||||
|
|
||||||
wxDisplay display(wxDisplay::GetFromWindow(main_frame));
|
wxDisplay display(wxDisplay::GetFromWindow(main_frame));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user