From b613297337187c79468d631370814084dabed26f Mon Sep 17 00:00:00 2001 From: merlin Date: Mon, 26 Nov 2007 08:46:09 +0000 Subject: suppression de warnings intempestifs --- src/MTools/Comp/MMultiSelection.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/MTools/Comp/MMultiSelection.pm b/src/MTools/Comp/MMultiSelection.pm index 8be6ecc..e7c7b67 100644 --- a/src/MTools/Comp/MMultiSelection.pm +++ b/src/MTools/Comp/MMultiSelection.pm @@ -271,13 +271,13 @@ sub addDropTarget { sub removeDropTarget { my ($self, $target) = @_; - if ($self -> {__last_notified} == $target) + if (defined $self -> {__last_notified} && $self -> {__last_notified} == $target) { $self -> {__last_notified} = undef; } for (my $i = @{$self -> {__drop_targets}} - 1; $i >= 0; $i--) { - if (@{$self -> {__drop_targets}} [$i] eq $target) + if (@{$self -> {__drop_targets}} [$i] == $target) { splice (@{$self -> {__drop_targets}}, $i, 1); last; @@ -528,9 +528,9 @@ sub __update_fleche_moved { $self -> {__last_notified} = undef; for (my $i = 0; $i < @targets; $i ++) { - if (minstance ($targets [$i]) == $selected [0] || minstance ($targets [$i]) == $selected [1]) + if (defined $selected [0] && minstance ($targets [$i]) == $selected [0] || defined $selected [1] && minstance ($targets [$i]) == $selected [1]) { - if ($last_notified != $targets [$i]) + if (!defined $last_notified || $last_notified != $targets [$i]) { $targets [$i] -> notify ('DRAGENTER'); } @@ -538,7 +538,7 @@ sub __update_fleche_moved { } else { - if ($last_notified == $targets [$i]) + if (defined $last_notified && $last_notified == $targets [$i]) { $targets [$i] -> notify ('DRAGLEAVE'); } -- cgit v1.1