diff --git a/xs/src/slic3r/GUI/GUI.cpp b/xs/src/slic3r/GUI/GUI.cpp index 0410b7969..3c8504756 100644 --- a/xs/src/slic3r/GUI/GUI.cpp +++ b/xs/src/slic3r/GUI/GUI.cpp @@ -1,4 +1,5 @@ #include "GUI.hpp" +#include "WipeTowerDialog.hpp" #include @@ -678,6 +679,32 @@ void add_frequently_changed_parameters(wxWindow* parent, wxBoxSizer* sizer, wxFl option = Option(def, "brim"); m_optgroup->append_single_option_line(option); + + Line line = { _(L("")), "" }; + line.widget = [config](wxWindow* parent){ + auto wiping_dialog_button = new wxButton(parent, wxID_ANY, _(L("Purging volumes"))+"\u2026", wxDefaultPosition, wxDefaultSize, wxBU_LEFT); + auto sizer = new wxBoxSizer(wxHORIZONTAL); + sizer->Add(wiping_dialog_button); + wiping_dialog_button->Bind(wxEVT_BUTTON, ([config, parent](wxCommandEvent& e) + { + std::vector init_matrix = (config->option("wiping_volumes_matrix"))->values; + std::vector init_extruders = (config->option("wiping_volumes_extruders"))->values; + + WipingDialog dlg(parent,std::vector(init_matrix.begin(),init_matrix.end()),std::vector(init_extruders.begin(),init_extruders.end())); + + if (dlg.ShowModal() == wxID_OK) { + std::vector matrix = dlg.get_matrix(); + std::vector extruders = dlg.get_extruders(); + (config->option("wiping_volumes_matrix"))->values = std::vector(matrix.begin(),matrix.end()); + (config->option("wiping_volumes_extruders"))->values = std::vector(extruders.begin(),extruders.end()); + } + })); + return sizer; + }; + m_optgroup->append_line(line); + + + sizer->Add(m_optgroup->sizer, 0, wxEXPAND | wxBOTTOM | wxBottom, 1); }