GCode Preview - Added objects and wipe tower transparent shells

This commit is contained in:
Enrico Turri 2018-02-12 09:04:05 +01:00
parent 6b14e7cc54
commit 3f006dc11a
8 changed files with 152 additions and 1 deletions

View file

@ -80,6 +80,7 @@ sub new {
my $checkbox_travel = Wx::CheckBox->new($self, -1, "Travel");
my $checkbox_retractions = Wx::CheckBox->new($self, -1, "Retractions");
my $checkbox_unretractions = Wx::CheckBox->new($self, -1, "Unretractions");
my $checkbox_shells = Wx::CheckBox->new($self, -1, "Shells");
my $hsizer = Wx::BoxSizer->new(wxHORIZONTAL);
my $vsizer = Wx::BoxSizer->new(wxVERTICAL);
@ -106,6 +107,8 @@ sub new {
$bottom_sizer->Add($checkbox_retractions, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, 5);
$bottom_sizer->AddSpacer(10);
$bottom_sizer->Add($checkbox_unretractions, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, 5);
$bottom_sizer->AddSpacer(10);
$bottom_sizer->Add($checkbox_shells, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, 5);
my $sizer = Wx::BoxSizer->new(wxHORIZONTAL);
$sizer->Add($canvas, 1, wxALL | wxEXPAND, 0);
@ -217,6 +220,12 @@ sub new {
$self->refresh_print;
$self->auto_zoom(1);
});
EVT_CHECKBOX($self, $checkbox_shells, sub {
$self->print->set_gcode_preview_shells_visible($checkbox_shells->IsChecked());
$self->auto_zoom(0);
$self->refresh_print;
$self->auto_zoom(1);
});
$self->SetSizer($main_sizer);
$self->SetMinSize($self->GetSize);