diff options
| author | Maarten Vanraes <alien@mageia.org> | 2016-04-24 21:37:30 +0200 |
|---|---|---|
| committer | Maarten Vanraes <alien@mageia.org> | 2016-04-24 23:23:39 +0200 |
| commit | 71c941594e36b631d26e49049576e669e0798ccf (patch) | |
| tree | b58ecad8683ed42588a242cc8bc1fef5c4827833 /lib/ManaTools/Shared/GUI/ExtWidget.pm | |
| parent | cb5c1fb04b6a80b5af3313bdc679f09cd2ceac7d (diff) | |
| download | manatools-71c941594e36b631d26e49049576e669e0798ccf.tar manatools-71c941594e36b631d26e49049576e669e0798ccf.tar.gz manatools-71c941594e36b631d26e49049576e669e0798ccf.tar.bz2 manatools-71c941594e36b631d26e49049576e669e0798ccf.tar.xz manatools-71c941594e36b631d26e49049576e669e0798ccf.zip | |
Handle eventHandlers more consistently
Diffstat (limited to 'lib/ManaTools/Shared/GUI/ExtWidget.pm')
| -rw-r--r-- | lib/ManaTools/Shared/GUI/ExtWidget.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/ManaTools/Shared/GUI/ExtWidget.pm b/lib/ManaTools/Shared/GUI/ExtWidget.pm index 2c886427..cb8c961e 100644 --- a/lib/ManaTools/Shared/GUI/ExtWidget.pm +++ b/lib/ManaTools/Shared/GUI/ExtWidget.pm @@ -147,6 +147,7 @@ has 'itemEventType' => ( default => $yui::YEvent::MenuEvent, ); +# TODO: eventHandler from event Role should react with replacepoint!!! has 'replacepoint' => ( is => 'rw', isa => 'Maybe[ManaTools::Shared::GUI::ReplacePoint]', @@ -232,9 +233,12 @@ sub buildSelectionWidget { # create a replacepoint on the selectionWidget $self->{replacepoint} = ManaTools::Shared::GUI::ReplacePoint->new(parentWidget => $parentWidget); - # parentEventHandler must be set directly, because we don't add the - # eventHandler to a parentEventHandler, instead the events are processed - # through the selectorWidget's EventRole processEvent function + # because this Event's processEvent also takes care of the replacepoints + # processEvents, it means we cannot set the replacepoint's (being an + # eventHandler) eventHandler -- which would add (next to setting the + # parentEventHandler) the replacepoint as a child, and thus also call + # processEvents from the parent down. Therefor, we'll set the + # parentEventHandler directly, so that any parent referrals still work. $self->{replacepoint}->parentEventHandler($self->{eventHandler}); # don't add any children right away |
