Skip to content

Commit

Permalink
Fix panic when resetting areas. Closes #3566
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Nov 18, 2023
1 parent 1571027 commit a0d092f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/egui/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,9 @@ impl Memory {
/// Forget window positions, sizes etc.
/// Can be used to auto-layout windows.
pub fn reset_areas(&mut self) {
self.areas = Default::default();
for area in self.areas.values_mut() {
*area = Default::default();
}
}

/// Obtain the previous rectangle of an area.
Expand Down

0 comments on commit a0d092f

Please sign in to comment.