Skip to content

Commit

Permalink
added "slice now" button to plater UI
Browse files Browse the repository at this point in the history
  • Loading branch information
lordofhyphens committed Jul 9, 2016
1 parent 7e93bd7 commit f33b4dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Slic3r/GUI/Plater.pm
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ sub new {
});

# right pane buttons
$self->{btn_slice_gcode} = Wx::Button->new($self, -1, "Slice Now…", wxDefaultPosition, [-1, 30], wxBU_LEFT);
$self->{btn_export_gcode} = Wx::Button->new($self, -1, "Export G-code…", wxDefaultPosition, [-1, 30], wxBU_LEFT);
$self->{btn_print} = Wx::Button->new($self, -1, "Print…", wxDefaultPosition, [-1, 30], wxBU_LEFT);
$self->{btn_send_gcode} = Wx::Button->new($self, -1, "Send to printer", wxDefaultPosition, [-1, 30], wxBU_LEFT);
Expand All @@ -207,6 +208,7 @@ sub new {
arrange bricks.png
export_gcode cog_go.png
print arrow_up.png
slice_gcode cog_go.png
send_gcode arrow_up.png
export_stl brick_go.png
Expand All @@ -225,6 +227,10 @@ sub new {
}
$self->selection_changed(0);
$self->object_list_changed;
EVT_BUTTON($self, $self->{btn_slice_gcode}, sub {
$self->{send_gcode_file} = $self->export_gcode(Wx::StandardPaths::Get->GetTempDir());
Slic3r::thread_cleanup();
});
EVT_BUTTON($self, $self->{btn_export_gcode}, sub {
$self->export_gcode;
});
Expand Down Expand Up @@ -391,6 +397,7 @@ sub new {
$buttons_sizer->Add($self->{btn_print}, 0, wxALIGN_RIGHT, 0);
$buttons_sizer->Add($self->{btn_send_gcode}, 0, wxALIGN_RIGHT, 0);
$buttons_sizer->Add($self->{btn_export_gcode}, 0, wxALIGN_RIGHT, 0);
$buttons_sizer->Add($self->{btn_slice_gcode}, 0, wxALIGN_RIGHT, 0);

my $right_sizer = Wx::BoxSizer->new(wxVERTICAL);
$right_sizer->Add($presets, 0, wxEXPAND | wxTOP, 10) if defined $presets;
Expand Down

0 comments on commit f33b4dd

Please sign in to comment.