mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-13 07:29:01 +08:00
Some fixes and additions to the scale/rotate commands in the object parts dialog. #3900
This commit is contained in:
parent
5257f373e7
commit
cc1c9b0920
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user