Merge remote-tracking branch 'origin/updating' into new_main_page_ui

This commit is contained in:
YuSanka 2018-05-02 08:42:30 +02:00
commit 2cab573a02
95 changed files with 7513 additions and 1736 deletions

View file

@ -682,6 +682,9 @@ sub load_files {
Slic3r::GUI::show_error($self, $@) if $@;
$_->load_current_preset for (values %{$self->GetFrame->{options_tabs}});
wxTheApp->{app_config}->update_config_dir(dirname($input_file));
# forces the update of the config here, or it will invalidate the imported layer heights profile if done using the timer
# and if the config contains a "layer_height" different from the current defined one
$self->async_apply_config;
}
else
{
@ -1696,6 +1699,7 @@ sub update {
$self->{canvas}->reload_scene if $self->{canvas};
$self->{canvas3D}->reload_scene if $self->{canvas3D};
$self->{preview3D}->reset_gcode_preview_data if $self->{preview3D};
$self->{preview3D}->reload_print if $self->{preview3D};
}
@ -1801,22 +1805,26 @@ sub on_config_change {
sub list_item_deselected {
my ($self, $event) = @_;
return if $PreventListEvents;
$self->{_lecursor} = Wx::BusyCursor->new();
if ($self->{list}->GetFirstSelected == -1) {
$self->select_object(undef);
$self->{canvas}->Refresh;
#FIXME VBOs are being refreshed just to change a selection color?
$self->{canvas3D}->reload_scene if $self->{canvas3D};
}
undef $self->{_lecursor};
}
sub list_item_selected {
my ($self, $event) = @_;
return if $PreventListEvents;
$self->{_lecursor} = Wx::BusyCursor->new();
my $obj_idx = $event->GetIndex;
$self->select_object($obj_idx);
$self->{canvas}->Refresh;
#FIXME VBOs are being refreshed just to change a selection color?
$self->{canvas3D}->reload_scene if $self->{canvas3D};
undef $self->{_lecursor};
}
sub list_item_activated {
@ -1875,6 +1883,7 @@ sub object_cut_dialog {
$self->remove($obj_idx);
$self->load_model_objects(grep defined($_), @new_objects);
$self->arrange;
$self->{canvas3D}->zoom_to_volumes if $self->{canvas3D};
}
}
@ -1949,7 +1958,8 @@ sub selection_changed {
my ($self) = @_;
my ($obj_idx, $object) = $self->selected_object;
my $have_sel = defined $obj_idx;
$self->Freeze;
if ($self->{htoolbar}) {
# On OSX or Linux
$self->{htoolbar}->EnableTool($_, $have_sel)
@ -2000,6 +2010,7 @@ sub selection_changed {
# prepagate the event to the frame (a custom Wx event would be cleaner)
$self->GetFrame->on_plater_selection_changed($have_sel);
$self->Thaw;
}
sub select_object {