1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Fix panic when resetting areas. Closes #3566

This commit is contained in:
Emil Ernerfeldt
2023-11-18 19:37:55 +01:00
parent 1571027556
commit a0d092f38e

View File

@@ -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.