diff options
author | marion | 2007-07-20 14:50:25 +0000 |
---|---|---|
committer | marion | 2007-07-20 14:50:25 +0000 |
commit | e61ee56e425cc7bd0c878729ec84b746a96c7e24 (patch) | |
tree | 4d82a19701fba28a28379b0307f1bf45d5d0f87a /src/MTools/GUI/MClip.pm | |
parent | 389dc2edaab8987dfc1475149940b9e615c2182b (diff) | |
download | mtc-e61ee56e425cc7bd0c878729ec84b746a96c7e24.zip mtc-e61ee56e425cc7bd0c878729ec84b746a96c7e24.tar.gz mtc-e61ee56e425cc7bd0c878729ec84b746a96c7e24.tar.bz2 mtc-e61ee56e425cc7bd0c878729ec84b746a96c7e24.tar.xz |
Déplacement du plisten pour supprimer warning
Diffstat (limited to 'src/MTools/GUI/MClip.pm')
-rw-r--r-- | src/MTools/GUI/MClip.pm | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/src/MTools/GUI/MClip.pm b/src/MTools/GUI/MClip.pm index bc8405d..cf4f850 100644 --- a/src/MTools/GUI/MClip.pm +++ b/src/MTools/GUI/MClip.pm @@ -34,55 +34,55 @@ BEGIN } sub new { - my ($class, $clipped, $path, $debug) = @_; - my $self = new MTools::MObjet (); - bless $self, $class; - - $self -> recordProperty ('-visible', 1); - $self -> plisten ('-visible', sub { - my ($src, $key, $val) = @_; - if ($val == 0) - { - mconfigure($self->{__clipped}, -clip => undef); - } - else - { - mconfigure($self->{__clipped}, -clip => $self->{__clip}); - } - }); - - if (!defined $debug) {$debug = 0} - - my $clip = $path; - if(ref ($path) eq 'ARRAY') - { - my $type = shift @{$path}; - $clip = $zinc -> add ($type, $clipped -> {instance}, $path, - -filled => 1, - -priority => 10, - -linewidth => 0, - -fillcolor => "#000000", - -visible => $debug, - -sensitive => 0, - ); - } - elsif(ref ($path) eq '') - { - $clip = minstance ($clip, $clipped); - MTools::chggroup ($clip, $clipped); - MTools::mconfigure ($clip, -visible => $debug, -sensitive => 0); - } - else - { - MTools::chggroup ($clip, $clipped); - MTools::mconfigure (-visible => $debug, -sensitive => 0); - $clip = minstance ($clip); - } + my ($class, $clipped, $path, $debug) = @_; + my $self = new MTools::MObjet (); + bless $self, $class; + + if (!defined $debug) {$debug = 0} + + my $clip = $path; + if(ref ($path) eq 'ARRAY') + { + my $type = shift @{$path}; + $clip = $zinc -> add ($type, $clipped -> {instance}, $path, + -filled => 1, + -priority => 10, + -linewidth => 0, + -fillcolor => "#000000", + -visible => $debug, + -sensitive => 0, + ); + } + elsif(ref ($path) eq '') + { + $clip = minstance ($clip, $clipped); + MTools::chggroup ($clip, $clipped); + MTools::mconfigure ($clip, -visible => $debug, -sensitive => 0); + } + else + { + MTools::chggroup ($clip, $clipped); + MTools::mconfigure ($clip, -visible => $debug, -sensitive => 0); + $clip = minstance ($clip); + } $self -> {__clipped} = $clipped; $self -> {__clip} = $clip; mconfigure ($clipped, -clip => $clip); + + $self -> recordProperty ('-visible', 1); + $self -> plisten ('-visible', sub { + my ($src, $key, $val) = @_; + if ($val == 0) + { + mconfigure($self->{__clipped}, -clip => undef); + } + else + { + mconfigure($self->{__clipped}, -clip => $self->{__clip}); + } + }); return $self; -} + } sub translate { my ($self, @args) = @_; |