aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ManaTools/Shared/GUI/EventRole.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ManaTools/Shared/GUI/EventRole.pm')
-rw-r--r--lib/ManaTools/Shared/GUI/EventRole.pm23
1 files changed, 1 insertions, 22 deletions
diff --git a/lib/ManaTools/Shared/GUI/EventRole.pm b/lib/ManaTools/Shared/GUI/EventRole.pm
index 02376b81..3326610b 100644
--- a/lib/ManaTools/Shared/GUI/EventRole.pm
+++ b/lib/ManaTools/Shared/GUI/EventRole.pm
@@ -75,6 +75,7 @@ has 'eventHandler' => (
is => 'ro',
does => 'ManaTools::Shared::GUI::EventHandlerRole',
required => 1,
+ handles => [ 'parentDialog' ],
);
has 'name' => (
@@ -107,27 +108,5 @@ sub DEMOLISH {
#=============================================================
-=head2 parentDialog
-
-=head3 INPUT
-
- $self: this object
-
-=head3 DESCRIPTION
-
- finds the parent Dialog
-
-=cut
-
-#=============================================================
-sub parentDialog {
- my $self = shift;
- my $eventHandler = $self->eventHandler();
- while (defined($eventHandler) && !$eventHandler->isa('ManaTools::Shared::GUI::Dialog') && $eventHandler->does('ManaTools::Shared::GUI::EventRole')) {
- $eventHandler = $eventHandler->eventHandler();
- }
- return $eventHandler;
-}
-
1;