Clean up outline selections when its modal gets closed
This commit is contained in:
parent
dd730549df
commit
2ca17bd03e
1 changed files with 7 additions and 1 deletions
|
@ -54,7 +54,13 @@ impl FocusableView for OutlineView {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EventEmitter<DismissEvent> for OutlineView {}
|
impl EventEmitter<DismissEvent> for OutlineView {}
|
||||||
impl ModalView for OutlineView {}
|
impl ModalView for OutlineView {
|
||||||
|
fn on_before_dismiss(&mut self, cx: &mut ViewContext<Self>) -> bool {
|
||||||
|
self.picker
|
||||||
|
.update(cx, |picker, cx| picker.delegate.restore_active_editor(cx));
|
||||||
|
true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Render for OutlineView {
|
impl Render for OutlineView {
|
||||||
fn render(&mut self, _cx: &mut ViewContext<Self>) -> impl IntoElement {
|
fn render(&mut self, _cx: &mut ViewContext<Self>) -> impl IntoElement {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue