aboutsummaryrefslogtreecommitdiff
path: root/Perl
diff options
context:
space:
mode:
authoretienne2003-02-20 08:47:17 +0000
committeretienne2003-02-20 08:47:17 +0000
commit558a3e24d9e47bf31ef6088d499afa2197548ba1 (patch)
tree1b0652363bd266af3b62b8057ddb1e7bd7738f46 /Perl
parente9ec6e3597bd0583dd689c6d6c6f798d007bfeb5 (diff)
downloadtkzinc-558a3e24d9e47bf31ef6088d499afa2197548ba1.zip
tkzinc-558a3e24d9e47bf31ef6088d499afa2197548ba1.tar.gz
tkzinc-558a3e24d9e47bf31ef6088d499afa2197548ba1.tar.bz2
tkzinc-558a3e24d9e47bf31ef6088d499afa2197548ba1.tar.xz
Correction de bug concernant l'affichage de bbox de groupes vides.
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),