diff options
Diffstat (limited to 'src/MTools/Comp/MMultiSelection.pm')
-rw-r--r-- | src/MTools/Comp/MMultiSelection.pm | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/MTools/Comp/MMultiSelection.pm b/src/MTools/Comp/MMultiSelection.pm index 14c0c26..8be6ecc 100644 --- a/src/MTools/Comp/MMultiSelection.pm +++ b/src/MTools/Comp/MMultiSelection.pm @@ -362,8 +362,8 @@ sub __fleche_pressed { else { $self -> {__drag_started} = 1; - $self -> {__lx} = $x; - $self -> {__ly} = $y; + $self -> {position_fleche_x} = $x; + $self -> {position_fleche_y} = $y; $self -> notify ('FLECHEPRESSED', $x, $y, $t); } } @@ -385,9 +385,9 @@ sub __fleche_released { } else { - $self -> notify ('FLECHERELEASED', $x - $self -> {__lx}, $y - $self -> {__ly}, $t); - $self -> {__lx} = $x; - $self -> {__ly} = $y; + $self -> notify ('FLECHERELEASED', $x - $self -> {position_fleche_x}, $y - $self -> {position_fleche_y}, $t); + $self -> {position_fleche_x} = $x; + $self -> {position_fleche_y} = $y; } } @@ -427,10 +427,10 @@ sub __fleche_moved { } else { - $self -> notify ('FLECHEMOVED', $x - $self -> {__lx}, $y - $self -> {__ly}, $t); - $self -> __translate_selection ($x - $self -> {__lx}, $y - $self -> {__ly}); - $self -> {__lx} = $x; - $self -> {__ly} = $y; + $self -> notify ('FLECHEMOVED', $x - $self -> {position_fleche_x}, $y - $self -> {position_fleche_y}, $t); + $self -> __translate_selection ($x - $self -> {position_fleche_x}, $y - $self -> {position_fleche_y}); + $self -> {position_fleche_x} = $x; + $self -> {position_fleche_y} = $y; } } @@ -468,6 +468,8 @@ sub __translate_selection { sub __update_fleche_moved { my ($self, $x, $y) = @_; my $pt; + $self -> {position_fleche_x} = $x; + $self -> {position_fleche_y} = $y; if (@{$self -> {__fleche_points}} > 2) { $pt = $self -> {__fleche_points}[@{$self -> {__fleche_points}} - 3]; |