aboutsummaryrefslogtreecommitdiff
path: root/Perl/Zinc
diff options
context:
space:
mode:
authoretienne2002-07-17 15:18:47 +0000
committeretienne2002-07-17 15:18:47 +0000
commit00ef7a70de0f47a7f8b1742c8ce1458054596958 (patch)
treed620b63f49ea9cb7f80225d773bbd27f55acbc6f /Perl/Zinc
parentef7f9b23983b914fc79763cb605083fcaabd90eb (diff)
downloadtkzinc-00ef7a70de0f47a7f8b1742c8ce1458054596958.zip
tkzinc-00ef7a70de0f47a7f8b1742c8ce1458054596958.tar.gz
tkzinc-00ef7a70de0f47a7f8b1742c8ce1458054596958.tar.bz2
tkzinc-00ef7a70de0f47a7f8b1742c8ce1458054596958.tar.xz
Correction afin de pouvoir scanner des groupes atomiques
Diffstat (limited to 'Perl/Zinc')
-rw-r--r--Perl/Zinc/Debug.pm16
1 files changed, 15 insertions, 1 deletions
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);
}