This is an automated email from the ASF dual-hosted git repository.
yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new a6ca27c Fix exception in SWF target with recent changes in
ContentView.
new 9e78e3a Merge pull request #1146 from
estanglerbm/listbase-addelement-contentview-check
a6ca27c is described below
commit a6ca27c6d542360dae3dca7b16f13fea49caa31e
Author: Edward Stangler <[email protected]>
AuthorDate: Fri Aug 13 18:42:01 2021 -0500
Fix exception in SWF target with recent changes in ContentView.
---
.../MXRoyale/src/main/royale/mx/controls/listClasses/ListBase.as | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListBase.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListBase.as
index 9719d57..ef1cf32 100644
---
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListBase.as
+++
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/ListBase.as
@@ -1027,6 +1027,11 @@ use namespace mx_internal;
override public function addElement(c:IChild, dispatchEvent:Boolean =
true):void
{
var contentView:IParent = getLayoutHost().contentView as IParent;
+ if (c == contentView)
+ {
+ super.addElement(c);
+ return;
+ }
if (contentView == this)
return super.addElement(c, dispatchEvent);
contentView.addElement(c, dispatchEvent);