diff --git a/lib/Slic3r/GUI/Tab.pm b/lib/Slic3r/GUI/Tab.pm index fd6db27ff..3c44322b2 100644 --- a/lib/Slic3r/GUI/Tab.pm +++ b/lib/Slic3r/GUI/Tab.pm @@ -1141,6 +1141,7 @@ sub build { nozzle_diameter extruder_offset retract_length retract_lift retract_speed retract_restart_extra retract_before_travel retract_layer_change wipe retract_length_toolchange retract_restart_extra_toolchange + printer_notes )); $self->{config}->set('printer_settings_id', ''); @@ -1392,8 +1393,22 @@ sub build { } } + { + my $page = $self->add_options_page('Notes', 'note.png'); + { + my $optgroup = $page->new_optgroup('Notes', + label_width => 0, + ); + my $option = $optgroup->get_option('printer_notes'); + $option->full_width(1); + $option->height(250); + $optgroup->append_single_option_line($option); + } + } + $self->{extruder_pages} = []; $self->_build_extruder_pages; + $self->_update_serial_ports if (!$params{no_controller}); } @@ -1488,9 +1503,12 @@ sub _build_extruder_pages { } # rebuild page list + my @pages_without_extruders = (grep $_->{title} !~ /^Extruder \d+/, @{$self->{pages}}); + my $page_notes = pop @pages_without_extruders; @{$self->{pages}} = ( - (grep $_->{title} !~ /^Extruder \d+/, @{$self->{pages}}), + @pages_without_extruders, @{$self->{extruder_pages}}[ 0 .. $self->{extruders_count}-1 ], + $page_notes ); $self->update_tree; } diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 545cc3e44..b73390ab1 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -841,6 +841,15 @@ PrintConfigDef::PrintConfigDef() def->full_width = true; def->height = 60; + def = this->add("printer_notes", coString); + def->label = "Printer notes"; + def->tooltip = "You can put your notes regarding the printer here."; + def->cli = "printer-notes=s"; + def->multiline = true; + def->full_width = true; + def->height = 130; + def->default_value = new ConfigOptionString(""); + def = this->add("print_settings_id", coString); def->default_value = new ConfigOptionString(""); diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index 101cb2c52..770d2664d 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -422,6 +422,7 @@ class PrintConfig : public GCodeConfig ConfigOptionString output_filename_format; ConfigOptionFloat perimeter_acceleration; ConfigOptionStrings post_process; + ConfigOptionString printer_notes; ConfigOptionFloat resolution; ConfigOptionFloats retract_before_travel; ConfigOptionBools retract_layer_change; @@ -480,6 +481,7 @@ class PrintConfig : public GCodeConfig OPT_PTR(output_filename_format); OPT_PTR(perimeter_acceleration); OPT_PTR(post_process); + OPT_PTR(printer_notes); OPT_PTR(resolution); OPT_PTR(retract_before_travel); OPT_PTR(retract_layer_change);