Skip to content

Commit

Permalink
Merge pull request #158 from joulei/fix-adaptive-view-reloading
Browse files Browse the repository at this point in the history
Do not override variant selectors on doc updates
  • Loading branch information
kevinaboos authored Sep 23, 2024
2 parents 8b09a04 + 1c6c55d commit 6a8d31e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/shared/adaptive_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ impl LiveHook for AdaptiveView {
}
}

fn after_apply_from_doc(&mut self, cx:&mut Cx) {
fn after_apply_from(&mut self, cx: &mut Cx, apply: &mut Apply) {
// Do not override the current selector if we are updating from the doc
if let ApplyFrom::UpdateFromDoc {..} = apply.from { return };
self.set_default_variant_selector(cx);
}

Expand Down

0 comments on commit 6a8d31e

Please sign in to comment.