mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +00:00
New --post-process option. Includes some cleaning of the STDOUT messages
This commit is contained in:
@@ -33,7 +33,7 @@ sub new {
|
||||
$bold_font->SetPointSize($label->GetFont()->GetPointSize());
|
||||
$label->SetFont($bold_font) if $opt->{important};
|
||||
my $field;
|
||||
if ($opt->{type} =~ /^(i|f|s)$/) {
|
||||
if ($opt->{type} =~ /^(i|f|s|s@)$/) {
|
||||
my $style = 0;
|
||||
my $size = Wx::wxDefaultSize;
|
||||
|
||||
@@ -42,10 +42,12 @@ sub new {
|
||||
$size = Wx::Size->new($opt->{width} || -1, $opt->{height} || -1);
|
||||
}
|
||||
|
||||
$field = Wx::TextCtrl->new($parent, -1, Slic3r::Config->get($opt_key),
|
||||
my ($get, $set) = $opt->{type} eq 's@' ? qw(serialize deserialize) : qw(get set);
|
||||
|
||||
$field = Wx::TextCtrl->new($parent, -1, Slic3r::Config->$get($opt_key),
|
||||
Wx::wxDefaultPosition, $size, $style);
|
||||
EVT_TEXT($parent, $field, sub { Slic3r::Config->set($opt_key, $field->GetValue) });
|
||||
push @reload_callbacks, sub { $field->SetValue(Slic3r::Config->get($opt_key)) };
|
||||
EVT_TEXT($parent, $field, sub { Slic3r::Config->$set($opt_key, $field->GetValue) });
|
||||
push @reload_callbacks, sub { $field->SetValue(Slic3r::Config->$get($opt_key)) };
|
||||
} elsif ($opt->{type} eq 'bool') {
|
||||
$field = Wx::CheckBox->new($parent, -1, "");
|
||||
$field->SetValue(Slic3r::Config->get($opt_key));
|
||||
|
||||
@@ -57,7 +57,7 @@ sub new {
|
||||
},
|
||||
gcode => {
|
||||
title => 'Custom GCODE',
|
||||
options => [qw(start_gcode end_gcode gcode_comments)],
|
||||
options => [qw(start_gcode end_gcode gcode_comments post_process)],
|
||||
},
|
||||
extrusion => {
|
||||
title => 'Extrusion',
|
||||
@@ -181,7 +181,7 @@ sub do_slice {
|
||||
status_cb => sub {
|
||||
my ($percent, $message) = @_;
|
||||
if (&Wx::wxVERSION_STRING =~ / 2\.(8\.|9\.[2-9])/) {
|
||||
$process_dialog->Update($percent, $message);
|
||||
$process_dialog->Update($percent, "$message...");
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user