mirror of
https://github.com/danbulant/cushy
synced 2026-06-18 22:11:34 +00:00
Switcher now unmounts
This isn't quite perfect, as a Switcher shared with multiple windows will only unmount in one window.
This commit is contained in:
parent
02e90e48c6
commit
9bd78c648b
1 changed files with 1 additions and 0 deletions
|
|
@ -55,6 +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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue