mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
Fix panic when resetting areas. Closes #3566
This commit is contained in:
@@ -727,7 +727,9 @@ impl Memory {
|
|||||||
/// Forget window positions, sizes etc.
|
/// Forget window positions, sizes etc.
|
||||||
/// Can be used to auto-layout windows.
|
/// Can be used to auto-layout windows.
|
||||||
pub fn reset_areas(&mut self) {
|
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.
|
/// Obtain the previous rectangle of an area.
|
||||||
|
|||||||
Reference in New Issue
Block a user