mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-05 17:00:42 +08:00
Add reference to Slic3r::Print to PresetChooser.
This commit is contained in:
parent
cfcf569a5e
commit
0a1d8f89af
@ -2,8 +2,11 @@
|
|||||||
|
|
||||||
namespace Slic3r { namespace GUI {
|
namespace Slic3r { namespace GUI {
|
||||||
|
|
||||||
PresetChooser::PresetChooser(wxWindow* parent) :
|
PresetChooser::PresetChooser(wxWindow* parent, Print& print) : PresetChooser(parent, print, SLIC3RAPP->settings) {}
|
||||||
wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, "")
|
|
||||||
|
PresetChooser::PresetChooser(wxWindow* parent, Print& print, Settings& external) :
|
||||||
|
wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, ""),
|
||||||
|
_settings(external), _print(print)
|
||||||
{
|
{
|
||||||
for (auto group : { preset_t::Print, preset_t::Material, preset_t::Printer }) {
|
for (auto group : { preset_t::Print, preset_t::Material, preset_t::Printer }) {
|
||||||
wxString name = "";
|
wxString name = "";
|
||||||
|
@ -20,7 +20,10 @@ using chooser_name_map = std::array<chooser_name_list, preset_types>;
|
|||||||
|
|
||||||
class PresetChooser : public wxPanel {
|
class PresetChooser : public wxPanel {
|
||||||
public:
|
public:
|
||||||
PresetChooser(wxWindow* parent);
|
|
||||||
|
/// Build a panel to contain a sizer for dropdowns for preset selection.
|
||||||
|
PresetChooser(wxWindow* parent, Print& print);
|
||||||
|
PresetChooser(wxWindow* parent, Print& print, Settings& external);
|
||||||
|
|
||||||
std::array<Choosers, preset_types> preset_choosers;
|
std::array<Choosers, preset_types> preset_choosers;
|
||||||
|
|
||||||
@ -38,6 +41,8 @@ private:
|
|||||||
wxSizer* local_sizer {};
|
wxSizer* local_sizer {};
|
||||||
void _on_change_combobox(preset_t preset, wxBitmapComboBox* choice);
|
void _on_change_combobox(preset_t preset, wxBitmapComboBox* choice);
|
||||||
chooser_name_map __chooser_names;
|
chooser_name_map __chooser_names;
|
||||||
|
/// Reference to owning Plater's print
|
||||||
|
Print& _print;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user