Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeControl - Nested Nodes Incorrect Positions. #89

Open
skln131313 opened this issue May 19, 2014 · 0 comments
Open

TreeControl - Nested Nodes Incorrect Positions. #89

skln131313 opened this issue May 19, 2014 · 0 comments

Comments

@skln131313
Copy link

When a nested node with children is toggled it does not invalidate the parent node which causes the node to remain the same size. This can be fixed by adding InvalidateParent() into TreeNode::Open/Close.

But this reveals another error in that the parent node's total height is calculated before the children are given a chance to recalculate their layout size. This means the layout will always be behind one step.

Temporary fix would be to remove the if statement in Base::RecursiveLayout():

if ( NeedsLayout() )
{
    m_bNeedsLayout = false;
    Layout( skin );
}

Though this obviously comes with a performance hit, as every layout will be recalculated every render and may cause flicker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant