From fc06e0835731ec39d2a0c53bd7720b2b40ccc97a Mon Sep 17 00:00:00 2001 From: didier Date: Fri, 23 Nov 2007 16:58:58 +0000 Subject: Reinitialisation des bindings(MWritable MReconizer) ->Effacement de toutes les curves (MWritable) ->Variables Position fleche pour la MMultiselection --- src/MTools/Comp/MMultiSelection.pm | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/MTools/Comp/MMultiSelection.pm') 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]; -- cgit v1.1