Fix artboard pieces slowly popping in. Fixes #4351 Fixes #4804 This was due to the dependency between the root artboard's hierarchy and the nested artboard itself. We would: update nested artboards (NestedArtboard::advance) update hierarchy (Artboard::updateComponents) The problem is that this hierarchy update would/could change the opacity of those nested artboards. So nested artboard opacity would always be behind by a frame. We apparently already caught this in the editor as the editor does it the right way around: update hierarchy (Artboard::updateComponents) update nested artboards (NestedArtboard::advance) Diffs= f1ddd88d4 Fix artboard pieces slowly popping in. (#4818)
diff --git a/.rive_head b/.rive_head index 389e070..859ae8c 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -3039909c2ab6ad363d1605276f325f7027de7d72 +f1ddd88d4e3b6d33adb85154b50dc86d0c3079fd
diff --git a/src/artboard.cpp b/src/artboard.cpp index 14fd0ea..d380660 100644 --- a/src/artboard.cpp +++ b/src/artboard.cpp
@@ -466,11 +466,15 @@ bool Artboard::advance(double elapsedSeconds) { + bool didUpdate = updateComponents(); for (auto nestedArtboard : m_NestedArtboards) { - nestedArtboard->advance((float)elapsedSeconds); + if (nestedArtboard->advance((float)elapsedSeconds)) + { + didUpdate = true; + } } - return updateComponents(); + return didUpdate; } Core* Artboard::hitTest(HitInfo* hinfo, const Mat2D* xform)