mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 16:51:21 -06:00
Fix last_pos shifting and add unit test
This commit is contained in:
parent
4c62c1b570
commit
50526dea5a
3 changed files with 24 additions and 2 deletions
|
@ -57,9 +57,10 @@ sub set_shift {
|
|||
my $self = shift;
|
||||
my @shift = @_;
|
||||
|
||||
# if shift increases (goes towards right), last_pos decreases because it goes towards left
|
||||
$self->last_pos->translate(
|
||||
scale ($shift[X] - $self->shift_x),
|
||||
scale ($shift[Y] - $self->shift_y),
|
||||
scale ($self->shift_x - $shift[X]),
|
||||
scale ($self->shift_x - $shift[Y]),
|
||||
);
|
||||
|
||||
$self->shift_x($shift[X]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue