mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-12-01 17:32:52 +03:00
cached: do not cache visibility requests
This fixes a bug where a cached image can cause a containing viewport to honor a visibility request when the cached image is re-used. This is almost certainly never desirable because we probably only want viewports to scroll visible regions into view the first time they are drawn. This change makes that so, since the Result returned by 'cached' contains the visibility requests but its cached representation has them cleared.
This commit is contained in:
parent
0b21099b94
commit
590af4dce0
@ -1070,7 +1070,7 @@ cached n w =
|
||||
Nothing -> do
|
||||
wResult <- render w
|
||||
clickables <- renderedClickables wResult
|
||||
cacheUpdate n (clickables, wResult)
|
||||
cacheUpdate n (clickables, wResult & visibilityRequestsL .~ mempty)
|
||||
return wResult
|
||||
where
|
||||
-- Given the rendered result of a Widget, collect the list of "clickable" names
|
||||
|
Loading…
Reference in New Issue
Block a user