From 558a3e24d9e47bf31ef6088d499afa2197548ba1 Mon Sep 17 00:00:00 2001 From: etienne Date: Thu, 20 Feb 2003 08:47:17 +0000 Subject: Correction de bug concernant l'affichage de bbox de groupes vides. --- Perl/Zinc/Debug.pm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Perl') diff --git a/Perl/Zinc/Debug.pm b/Perl/Zinc/Debug.pm index a0699b5..bfef8aa 100644 --- a/Perl/Zinc/Debug.pm +++ b/Perl/Zinc/Debug.pm @@ -1067,6 +1067,7 @@ sub highlightitem { sub itemisoutside { my $zinc = shift; my @bbox = @_; + return unless @bbox == 4; my $outflag; $WARNING = 0; if ($bbox[2] < 0) { @@ -1351,11 +1352,15 @@ sub showattributes { } # bounding box my @bbox = $zinc->bbox($item); - my $btn = $fm->Button(-text => "($bbox[0], $bbox[1]), ($bbox[2], $bbox[3])") - ->grid(-row => $i, -col => 9, -sticky => 'nswe', -ipadx => 5); - $btn->bind('<1>', [\&showbbox, $zinc, $item]); - $btn->bind('', [\&hidebbox, $zinc]) ; - + if (@bbox == 4) { + my $btn = $fm->Button(-text => "($bbox[0], $bbox[1]), ($bbox[2], $bbox[3])") + ->grid(-row => $i, -col => 9, -sticky => 'nswe', -ipadx => 5); + $btn->bind('<1>', [\&showbbox, $zinc, $item]); + $btn->bind('', [\&hidebbox, $zinc]) ; + } else { + $fm->Label(-text => "--", , -relief => 'ridge') + ->grid(-row => $i, -col => 9, -sticky => 'nswe', -ipadx => 5); + } # tags my @tags = $zinc->gettags($item); $fm->Label(-text => join("\n", @tags), -- cgit v1.1