Skip to content

Commit

Permalink
Treat all Constraints and ClippingShapes differently than children wh…
Browse files Browse the repository at this point in the history
…en propagating collapse

Decided to go with the `is` check because it seems like all types of Constraints or ClippingShapes should follow this behavior now and in the future.

Diffs=
16cf8082f Treat Constraints, ClippingShapes and DrawRules as special Solo child types (#5897)

Co-authored-by: Philip Chung <[email protected]>
  • Loading branch information
philter and philter committed Aug 25, 2023
1 parent 42e8de2 commit ffb3fe7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e1b9d360b4ab7a2620f888cb9b4497d253e1da80
16cf8082fd9a66014305994c736d98cc12d96c73
8 changes: 3 additions & 5 deletions src/solo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ void Solo::propagateCollapse(bool collapse)
// Some child components shouldn't be considered as part of the solo set
// as they are more aking to properties of the solo itself. For those
// components, simply pass on the collapse value of the solo itself.
switch (child->coreType())
if (child->is<Constraint>() || child->is<ClippingShape>())
{
case ConstraintBase::typeKey:
case ClippingShapeBase::typeKey:
child->collapse(collapse);
continue;
child->collapse(collapse);
continue;
}

// This child is part of the solo set so only make it active if it's the
Expand Down

0 comments on commit ffb3fe7

Please sign in to comment.