Skip to content

Commit

Permalink
[SUTK] Fixed tab close button not working
Browse files Browse the repository at this point in the history
Root Cause: The recursive algorithm for updating order was incorrect, I should have been more careful!
Fix: Call updateEventsOrderRecursive() inside itself for each child container
  • Loading branch information
ravi688 committed Jan 6, 2025
1 parent dfb64ff commit c4004c6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sutk/source/Container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ namespace SUTK
updateEventsOrder();
std::vector<Container*>& childs = getChilds();
for(Container* &child : childs)
if(child->hasInputEventHandlers())
child->updateEventsOrder();
child->updateEventsOrderRecursive();
}

void Container::setParentChildRelation(Container* parent, std::size_t index) noexcept
Expand Down Expand Up @@ -214,7 +213,6 @@ namespace SUTK

void Container::alwaysFitInParent(Vec4Df margins) noexcept
{
Container* parent = getParent();
fitInParent(margins);
getAnchorRect()->setRect({ 0.0f, 0.0f, 1.0f, 1.0f });
}
Expand Down

0 comments on commit c4004c6

Please sign in to comment.