mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 20:01:33 +00:00
Remove all windows on dropping TestAppContext
This allows us to remove the dropped entities and flush effects as necessary.
This commit is contained in:
parent
10a872a370
commit
7ce6f23ed4
1 changed files with 2 additions and 3 deletions
|
@ -567,7 +567,7 @@ impl TestAppContext {
|
|||
|
||||
impl Drop for TestAppContext {
|
||||
fn drop(&mut self) {
|
||||
self.cx.borrow_mut().flush_effects();
|
||||
self.cx.borrow_mut().remove_all_windows();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -851,7 +851,7 @@ impl MutableAppContext {
|
|||
for (window_id, _) in self.cx.windows.drain() {
|
||||
self.presenters_and_platform_windows.remove(&window_id);
|
||||
}
|
||||
self.remove_dropped_entities();
|
||||
self.flush_effects();
|
||||
}
|
||||
|
||||
pub fn platform(&self) -> Arc<dyn platform::Platform> {
|
||||
|
@ -1401,7 +1401,6 @@ impl MutableAppContext {
|
|||
pub fn remove_window(&mut self, window_id: usize) {
|
||||
self.cx.windows.remove(&window_id);
|
||||
self.presenters_and_platform_windows.remove(&window_id);
|
||||
self.remove_dropped_entities();
|
||||
self.flush_effects();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue