aboutsummaryrefslogtreecommitdiff
path: root/Perl
diff options
context:
space:
mode:
Diffstat (limited to 'Perl')
-rw-r--r--Perl/Zinc/Debug.pm15
1 files changed, 10 insertions, 5 deletions
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('<ButtonRelease-1>', [\&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('<ButtonRelease-1>', [\&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),