diff --git a/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm b/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm index 308627b3f..e0fe90f6e 100644 --- a/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm +++ b/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm @@ -164,6 +164,19 @@ sub new { my $frame = $self->GetFrame; my $menu = Wx::Menu->new; + { + my $scaleMenu = Wx::Menu->new; + wxTheApp->append_menu_item($scaleMenu, "Uniformly… ", 'Scale the selected object along the XYZ axes', + sub { $self->changescale(undef, 0) }); + wxTheApp->append_menu_item($scaleMenu, "Along X axis…", 'Scale the selected object along the X axis', + sub { $self->changescale(X, 0) }, undef, 'bullet_red.png'); + wxTheApp->append_menu_item($scaleMenu, "Along Y axis…", 'Scale the selected object along the Y axis', + sub { $self->changescale(Y, 0) }, undef, 'bullet_green.png'); + wxTheApp->append_menu_item($scaleMenu, "Along Z axis…", 'Scale the selected object along the Z axis', + sub { $self->changescale(Z, 0) }, undef, 'bullet_blue.png'); + wxTheApp->append_submenu($menu, "Scale", 'Scale the selected object by a given factor', + $scaleMenu, undef, 'arrow_out.png'); + } { my $scaleToSizeMenu = Wx::Menu->new; wxTheApp->append_menu_item($scaleToSizeMenu, "Uniformly… ", 'Scale the selected object along the XYZ axes', @@ -174,7 +187,7 @@ sub new { sub { $self->changescale(Y, 1) }, undef, 'bullet_green.png'); wxTheApp->append_menu_item($scaleToSizeMenu, "Along Z axis…", 'Scale the selected object along the Z axis', sub { $self->changescale(Z, 1) }, undef, 'bullet_blue.png'); - wxTheApp->append_submenu($menu, "Scale to size", 'Scale the selected object along a single axis', + wxTheApp->append_submenu($menu, "Scale to size", 'Scale the selected object to match a given size', $scaleToSizeMenu, undef, 'arrow_out.png'); } { @@ -185,7 +198,8 @@ sub new { sub { $self->rotate(undef, Y) }, undef, 'bullet_green.png'); wxTheApp->append_menu_item($rotateMenu, "Around Z axis…", 'Rotate the selected object by an arbitrary angle around Z axis', sub { $self->rotate(undef, Z) }, undef, 'bullet_blue.png'); - wxTheApp->append_submenu($menu, "Rotate", 'Rotate the selected object by an arbitrary angle', $rotateMenu, undef, 'textfield.png'); + wxTheApp->append_submenu($menu, "Rotate", 'Rotate the selected object by an arbitrary angle', + $rotateMenu, undef, 'arrow_rotate_anticlockwise.png'); } $frame->PopupMenu($menu, $event->GetPoint); }); @@ -404,7 +418,6 @@ sub on_btn_lambda { # set a default extruder value, since user can't add it manually $new_volume->config->set_ifndef('extruder', 0); - $self->{parts_changed} = 1; $self->_parts_changed($self->{model_object}->volumes_count-1); } @@ -431,6 +444,7 @@ sub on_btn_delete { sub _parts_changed { my ($self, $selected_volume_idx) = @_; + $self->{parts_changed} = 1; $self->reload_tree($selected_volume_idx); if ($self->{canvas}) { $self->{canvas}->reset_objects;