TextLine append cause many problem
Status: Beta
Brought to you by:
steveneo
Because TextNode can contain many TextLine, and
when layour TextNode, TextLines added one by one into
TextNode. It has conflict with
LayoutManger.addComponent(), b/c the latter one
doesnt' handle TextLine append to last TextLine case, it
only do summary.
Now it cause IVisible.setLayer() can't calculate
correctly. Because same one line text can divice into 2
(some part duplicated content) TextLine to calculate
lineCache.
Logged In: YES
user_id=465192
There are 2 ways to resolve this problem:
1. Don't add Merged TextLine into
LayourManager.addComponent()
2. Avoid setLayer() called incorrectly in
LayouerManager.calculateLine().
I adopt 2, becuase the first can't handle LineWidth correctly,
it's very difficult to justify when a cache in LineCache
TextLine, its width change since another TextLine merge into
it. To archieve the latter function, I add "if" to avoid setLayer
() called when the overlap Component is owned by same
Node. For example, TextNode A has 2 TextLines, and
TextLines has merge event occurs, because they are owned
in same TextNode, this overlap is invalidate and needn't
setLayer()!