The TimelineUiState has two sets of cached draw items: content_drawn_since_last_update and profile_drawn_since_last_update. Both of these need to be wiped upon a DSL live reload, otherwise there are weird results displayed until you scroll them off screen or otherwise re-draw them.
The media_cache does not need to be modified.
Implementation ideas
This can be achieved by implementing the LiveHook trait for the Timeline widget struct, and then handling the case when apply.from is ApplyFrom::UpdateFromDoc.
impl LiveHook for Timeline {
fn after_apply(&mut self, cx: &mut Cx, apply: &mut Apply, _index: usize, _nodes: &[LiveNode]) {
if let ApplyFrom::UpdateFromDoc {..} = apply.from {
// TODO: clear caches here
}
}
}
The
TimelineUiState
has two sets of cached draw items:content_drawn_since_last_update
andprofile_drawn_since_last_update
. Both of these need to be wiped upon a DSL live reload, otherwise there are weird results displayed until you scroll them off screen or otherwise re-draw them.The
media_cache
does not need to be modified.Implementation ideas
This can be achieved by implementing the
LiveHook
trait for theTimeline
widget struct, and then handling the case whenapply.from
isApplyFrom::UpdateFromDoc
.