aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/ManaTools/Shared/GUI/EventHandlerRole.pm4
-rw-r--r--lib/ManaTools/Shared/GUI/ExtTab.pm9
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/ManaTools/Shared/GUI/EventHandlerRole.pm b/lib/ManaTools/Shared/GUI/EventHandlerRole.pm
index ba130bc7..852c97a1 100644
--- a/lib/ManaTools/Shared/GUI/EventHandlerRole.pm
+++ b/lib/ManaTools/Shared/GUI/EventHandlerRole.pm
@@ -522,7 +522,7 @@ sub findItem {
=head3 OUTPUT
- 0 if the loop should end, 1 otherwise
+ 0 if the loop should end, positive if handled, negative otherwise
=head3 DESCRIPTION
@@ -549,7 +549,7 @@ sub processEvents {
return $processed if $processed >= 0;
}
- return 1;
+ return -1;
}
#=============================================================
diff --git a/lib/ManaTools/Shared/GUI/ExtTab.pm b/lib/ManaTools/Shared/GUI/ExtTab.pm
index 0927b631..f7dd78b1 100644
--- a/lib/ManaTools/Shared/GUI/ExtTab.pm
+++ b/lib/ManaTools/Shared/GUI/ExtTab.pm
@@ -231,22 +231,23 @@ sub processEvent {
my $items = $self->items();
# call subevents
- return 0 if (!$replacepoint->processEvents($yevent));
+ my processed = $replacepoint->processEvents($yevent);
+ return $processed if $processed >= 0;
# only MenuEvents here...
- return 1 if ($yevent->eventType() != $yui::YEvent::MenuEvent);
+ return -1 if ($yevent->eventType() != $yui::YEvent::MenuEvent);
# only items from *this* tab
my $yitem = $yevent->item();
my $item = $self->findTabItem($yitem);
- return 1 if !defined($item);
+ return -1 if !defined($item);
# build the children
$self->buildTabItem($item);
# execute callback if needed
my $callback = $self->callback();
- my $result = 1;
+ my $result = -1;
$result = $callback->($self, $yevent, $item->backend()) if defined($callback);
# mark last item as this one