Fixed Switcher widget

This was broken in unreleased changes, hence no changelog update.
This commit is contained in:
Jonathan Johnson 2024-01-02 08:37:10 -08:00
parent 36d4239df5
commit c1d6e3f7fd
No known key found for this signature in database
GPG key ID: A66D6A34D6620579

View file

@ -55,7 +55,7 @@ impl WrapperWidget for Switcher {
context: &mut LayoutContext<'_, '_, '_, '_, '_>,
) -> Size<ConstraintLimit> {
if self.source.has_updated() {
self.child.unmount_in(context);
self.child = WidgetRef::new(self.source.get());
}
context.invalidate_when_changed(&self.source);
available_space