mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-03 23:10:36 +08:00
Remember manual control settings
This commit is contained in:
parent
782dda46a2
commit
6d371884a1
@ -15,7 +15,7 @@ use base qw(Wx::Dialog Class::Accessor);
|
||||
__PACKAGE__->mk_accessors(qw(sender writer config2 x_homed y_homed));
|
||||
|
||||
sub new {
|
||||
my ($class, $parent, $config, $sender) = @_;
|
||||
my ($class, $parent, $config, $sender, $manual_control_config) = @_;
|
||||
|
||||
my $self = $class->SUPER::new($parent, -1, "Manual Control", wxDefaultPosition,
|
||||
[500,400], wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
|
||||
@ -23,12 +23,7 @@ sub new {
|
||||
$self->writer(Slic3r::GCode::Writer->new);
|
||||
$self->writer->config->apply_dynamic($config);
|
||||
|
||||
$self->config2({
|
||||
xy_travel_speed => 130,
|
||||
z_travel_speed => 10,
|
||||
temperature => '',
|
||||
bed_temperature => '',
|
||||
});
|
||||
$self->config2($manual_control_config);
|
||||
|
||||
my $bed_sizer = Wx::FlexGridSizer->new(2, 3, 1, 1);
|
||||
$bed_sizer->AddGrowableCol(1, 1);
|
||||
|
@ -9,7 +9,7 @@ use Wx::Event qw(EVT_BUTTON EVT_MOUSEWHEEL EVT_TIMER EVT_SCROLLWIN);
|
||||
use base qw(Wx::Panel Class::Accessor);
|
||||
|
||||
__PACKAGE__->mk_accessors(qw(printer_name config sender jobs
|
||||
printing status_timer temp_timer));
|
||||
printing status_timer temp_timer manual_control_config));
|
||||
|
||||
use constant CONNECTION_TIMEOUT => 3; # seconds
|
||||
use constant STATUS_TIMER_INTERVAL => 1000; # milliseconds
|
||||
@ -21,6 +21,12 @@ sub new {
|
||||
|
||||
$self->printer_name($printer_name || 'Printer');
|
||||
$self->config($config);
|
||||
$self->manual_control_config({
|
||||
xy_travel_speed => 130,
|
||||
z_travel_speed => 10,
|
||||
temperature => '',
|
||||
bed_temperature => '',
|
||||
});
|
||||
$self->jobs([]);
|
||||
|
||||
# set up the timer that polls for updates
|
||||
@ -171,7 +177,7 @@ sub new {
|
||||
$left_sizer->Add($btn, 0, wxTOP, 15);
|
||||
EVT_BUTTON($self, $btn, sub {
|
||||
my $dlg = Slic3r::GUI::Controller::ManualControlDialog->new
|
||||
($self, $self->config, $self->sender);
|
||||
($self, $self->config, $self->sender, $self->manual_control_config);
|
||||
$dlg->ShowModal;
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user