Forced redrawing of cells when the parent ContainerController.updateCompositionShapes() is called. This fixes drawing of cells when the table structure of an existing table changes. It might be more efficient if there's a check to see if the table structure changes rather than blindly redrawing the table block every time.
Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/b408e2fb Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/b408e2fb Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/b408e2fb Branch: refs/heads/develop Commit: b408e2fb585faf60e446f4b76563e7409a541712 Parents: d159e00 Author: Harbs <ha...@in-tools.com> Authored: Tue Oct 28 10:56:31 2014 +0200 Committer: Harbs <ha...@in-tools.com> Committed: Tue Oct 28 10:56:31 2014 +0200 ---------------------------------------------------------------------- .../src/flashx/textLayout/container/ContainerController.as | 5 +++++ textLayout/src/flashx/textLayout/elements/TableElement.as | 1 + 2 files changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/b408e2fb/textLayout/src/flashx/textLayout/container/ContainerController.as ---------------------------------------------------------------------- diff --git a/textLayout/src/flashx/textLayout/container/ContainerController.as b/textLayout/src/flashx/textLayout/container/ContainerController.as index eef34fb..08f4a68 100644 --- a/textLayout/src/flashx/textLayout/container/ContainerController.as +++ b/textLayout/src/flashx/textLayout/container/ContainerController.as @@ -3203,6 +3203,11 @@ package flashx.textLayout.container childIdx++; newIdx++; oldIdx++; + if(newChild is TableBlockContainer) + { + // update the contents in case cells were added or removed. (There might be a more efficient way to do this, but this works.) + (newChild as TableBlockContainer).userData.updateCompositionShapes(); + } continue; } var newChildIdx:int = _shapeChildren.indexOf(newChild); http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/b408e2fb/textLayout/src/flashx/textLayout/elements/TableElement.as ---------------------------------------------------------------------- diff --git a/textLayout/src/flashx/textLayout/elements/TableElement.as b/textLayout/src/flashx/textLayout/elements/TableElement.as index a9472c1..2718c13 100644 --- a/textLayout/src/flashx/textLayout/elements/TableElement.as +++ b/textLayout/src/flashx/textLayout/elements/TableElement.as @@ -534,6 +534,7 @@ package flashx.textLayout.elements } if(colIdx < numColumns){ addChildAt(cellIdx++,cell); + cell.damage(); } } return true;