Closed BenDol closed 2 years ago
Maybe the problem is in here:
{ // cache index
child->m_childIndex = index + 1;
for (size_t i = index; ++i < childrenSize;)
m_children[i]->m_childIndex += 1;
}
shouldn't it be i = index + 1
on the for loop?
I think that is correct if that is in moveChildToIndex
Although when its setting its children's index it doesn't seems correct? Not sure I'll have to skim through how the indexing works.
I think that is correct if that is in
moveChildToIndex
Although when its setting its children's index it doesn't seems correct? Not sure I'll have to skim through how the indexing works.
I'm refering to the for loop in void UIWidget::insertChild(size_t index, const UIWidgetPtr& child)
But it seems to be fine, its using the pre increment there.
Priority
High
Area
What happened?
The
m_childIndex
doesn't stay in sync, to reproduce move windows around in the gamePanels, also the leftPanel does save windows correctly or at least does not load correctly.When you revert the change to UIWidget:getChildIndex(widget) to count the index again it works (since backwards compatibility isn't retained also)
Changing to this:
or adding backwards compatibility:
Does not solve the issues.
What OS are you seeing the problem on?
Windows
Code of Conduct