From c31647f3ac07bc4a9a0594c03c3ca2b44d0706d6 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Fri, 8 Dec 2023 12:54:49 +0100 Subject: [PATCH] Sla material info text in wizard with link --- src/slic3r/GUI/ConfigWizard.cpp | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/ConfigWizard.cpp b/src/slic3r/GUI/ConfigWizard.cpp index 3d7109799d..a5e992c09f 100644 --- a/src/slic3r/GUI/ConfigWizard.cpp +++ b/src/slic3r/GUI/ConfigWizard.cpp @@ -766,6 +766,10 @@ PageMaterials::PageMaterials(ConfigWizard *parent, Materials *materials, wxStrin html_window = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxSize(60 * em, 20 * em), wxHW_SCROLLBAR_AUTO); + html_window->Bind(wxEVT_HTML_LINK_CLICKED, [](wxHtmlLinkEvent& event) { + wxGetApp().open_browser_with_warning_dialog(event.GetLinkInfo().GetHref()); + event.Skip(false); + }); append(html_window, 0, wxEXPAND); list_printer->Bind(wxEVT_LISTBOX, [this](wxCommandEvent& evt) { @@ -855,9 +859,19 @@ void PageMaterials::set_compatible_printers_html_window(const std::vector(\"Template\") printer are universal profiles available for all printers. These might not be compatible with your printer."), materials->technology == T_FFF ? _L("Filaments") : _L("SLA materials")); } else { + bool has_medical = false; + for (const Preset *printer : materials->printers) { + if (printer->vendor && printer->vendor->id == "PrusaProMedical") { + has_medical = true; + } + } + // TRN PrusaSlicer-Medical ConfigWizard: Materials" + wxString zero_line = _L("The list of validated workflows for Medical One can be found in this article. Profiles for other materials are not verified by the material manufacturer and therefore may not correspond to the current version of the material."); + if (!has_medical) { + zero_line.Clear(); + } // TRN ConfigWizard: Materials : "%1%" = "Filaments"/"SLA materials" wxString first_line = format_wxstr(_L("%1% marked with * are not compatible with some installed printers."), materials->technology == T_FFF ? _L("Filaments") : _L("SLA materials")); - if (all_printers) { // TRN ConfigWizard: Materials : "%1%" = "filament"/"SLA material" wxString second_line = format_wxstr(_L("All installed printers are compatible with the selected %1%."), materials->technology == T_FFF ? _L("filament") : _L("SLA material")); @@ -868,12 +882,14 @@ void PageMaterials::set_compatible_printers_html_window(const std::vector" "" "" - "%s

%s" + "" + "%s

%s

%s" "
" "" "" , bgr_clr_str , text_clr_str + , zero_line , first_line , second_line ); @@ -891,13 +907,16 @@ void PageMaterials::set_compatible_printers_html_window(const std::vector" "" "" - "%s

%s" + "" + "%s

%s

%s" "" "" , bgr_clr_str , text_clr_str + , zero_line , first_line - , second_line); + , second_line + ); for (size_t i = 0; i < printer_names.size(); ++i) { text += wxString::Format("", boost::nowide::widen(printer_names[i]));
%s