aboutsummaryrefslogtreecommitdiff
path: root/src/MTools
diff options
context:
space:
mode:
authormerlin2007-11-26 08:46:09 +0000
committermerlin2007-11-26 08:46:09 +0000
commitb613297337187c79468d631370814084dabed26f (patch)
tree2ce3c15e906d22e3b447378659d2f1a84e1f3b04 /src/MTools
parentfc06e0835731ec39d2a0c53bd7720b2b40ccc97a (diff)
downloadmtc-b613297337187c79468d631370814084dabed26f.zip
mtc-b613297337187c79468d631370814084dabed26f.tar.gz
mtc-b613297337187c79468d631370814084dabed26f.tar.bz2
mtc-b613297337187c79468d631370814084dabed26f.tar.xz
suppression de warnings intempestifs
Diffstat (limited to 'src/MTools')
-rw-r--r--src/MTools/Comp/MMultiSelection.pm10
1 files 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');
}