From 00ef7a70de0f47a7f8b1742c8ce1458054596958 Mon Sep 17 00:00:00 2001 From: etienne Date: Wed, 17 Jul 2002 15:18:47 +0000 Subject: Correction afin de pouvoir scanner des groupes atomiques --- Perl/Zinc/Debug.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Perl/Zinc/Debug.pm b/Perl/Zinc/Debug.pm index dd792a1..be2b298 100644 --- a/Perl/Zinc/Debug.pm +++ b/Perl/Zinc/Debug.pm @@ -561,6 +561,7 @@ sub resizerectangle { } $zinc->raise($rectangle_id); $zinc->raise($text_id); + } # stop drawing rectangular area for search @@ -568,12 +569,25 @@ sub stoprectangle { my ($widget, $searchtype, $text) = @_; return unless ($zinc->find('withtag', $rectangle_id)); + # in order to avoid find problems with group atomicity, we set all -atomic + # attributes to 0 + my @groups = $zinc->find('withtype', 'group'); + my @atomicgroups; + for my $group (@groups) { + if ($zinc->itemcget($group, -atomic)) { + push(@atomicgroups, $group); + $zinc->itemconfigure($group, -atomic => 0); + } + } my @coords = $zinc->coords($rectangle_id); my @items; - for my $item ($zinc->find($searchtype, @coords)) { + for my $item ($zinc->find($searchtype, @coords, 1, 1)) { push (@items, $item) if $item != $rectangle_id and $item != $text_id; } + for my $group (@atomicgroups) { + $zinc->itemconfigure($group, -atomic => 1); + } &showresult($text, $zinc, @items); } -- cgit v1.1