mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-19 17:18:09 +08:00
Fixed undefined axis in rotate method of plater.pm
This commit is contained in:
parent
4b25d3924b
commit
8eb36b1bf9
@ -157,11 +157,6 @@ sub new {
|
|||||||
$self->rotate(rad2deg($angle), Z, 'absolute');
|
$self->rotate(rad2deg($angle), Z, 'absolute');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
print "angle: ";
|
|
||||||
print $angle;
|
|
||||||
print "\n";
|
|
||||||
|
|
||||||
$self->rotate(rad2deg($angle), undef, 'absolute', $axis_x, $axis_y, $axis_z) if $angle != 0;
|
$self->rotate(rad2deg($angle), undef, 'absolute', $axis_x, $axis_y, $axis_z) if $angle != 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -1187,7 +1182,10 @@ sub rotate {
|
|||||||
# $model_object->center_around_origin;
|
# $model_object->center_around_origin;
|
||||||
# $self->reset_thumbnail($obj_idx);
|
# $self->reset_thumbnail($obj_idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (defined $axis) {
|
||||||
Slic3r::GUI::update_rotation_value(deg2rad($angle), $axis == X ? "x" : ($axis == Y ? "y" : "z"));
|
Slic3r::GUI::update_rotation_value(deg2rad($angle), $axis == X ? "x" : ($axis == Y ? "y" : "z"));
|
||||||
|
}
|
||||||
|
|
||||||
# update print and start background processing
|
# update print and start background processing
|
||||||
$self->{print}->add_model_object($model_object, $obj_idx);
|
$self->{print}->add_model_object($model_object, $obj_idx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user