Repository: flex-asjs Updated Branches: refs/heads/develop b7a833d7d -> 81cbd002f
Fix for bug FLEX-35237. Apply supplied patch with minor changes. Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/81cbd002 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/81cbd002 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/81cbd002 Branch: refs/heads/develop Commit: 81cbd002fd6c12e97d719ea92a5a4eb5bf42d70c Parents: b7a833d Author: Peter Ent <[email protected]> Authored: Thu Jan 5 09:30:54 2017 -0500 Committer: Peter Ent <[email protected]> Committed: Thu Jan 5 09:30:54 2017 -0500 ---------------------------------------------------------------------- .../flex/html/beads/layouts/DataGridLayout.as | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/81cbd002/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as index 1d22956..a3bd4e8 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as @@ -18,6 +18,7 @@ //////////////////////////////////////////////////////////////////////////////// package org.apache.flex.html.beads.layouts { + import org.apache.flex.core.IBead; import org.apache.flex.core.IBeadLayout; import org.apache.flex.core.IBeadModel; import org.apache.flex.core.IBeadView; @@ -71,16 +72,23 @@ package org.apache.flex.html.beads.layouts { _strand = value; - var host:UIBase = _strand as UIBase; - host.addEventListener("widthChanged", handleSizeChanges); - host.addEventListener("heightChanged", handleSizeChanges); - host.addEventListener("sizeChanged", handleSizeChanges); - host.addEventListener("layoutNeeded", handleSizeChanges); + var host:UIBase = value as UIBase; var view:DataGridView = host.view as DataGridView; + header = view.header; listArea = view.listArea; + + var anylayout:IBead = listArea.getBeadByType(IBeadLayout); + if (anylayout != null) { + listArea.removeBead(anylayout); + } listArea.addBead(new BasicLayout()); + + host.addEventListener("widthChanged", handleSizeChanges); + host.addEventListener("heightChanged", handleSizeChanges); + host.addEventListener("sizeChanged", handleSizeChanges); + host.addEventListener("layoutNeeded", handleSizeChanges); } private var _header:UIBase;
