fix full redraw modules not cleaning up

This commit is contained in:
2025-11-17 21:11:35 -05:00
parent 955e6b7588
commit c7b255be4f

View File

@@ -102,7 +102,11 @@ impl Ui {
} }
pub fn redraw_all(&mut self) { pub fn redraw_all(&mut self) {
self.data.active.clear(); for (_, inst) in self.data.active.drain() {
for m in self.data.modules.iter_mut() {
m.on_undraw(&inst);
}
}
// free before bc nothing should exist // free before bc nothing should exist
self.free(); self.free();
let mut ctx = PainterCtx::new(&mut self.data); let mut ctx = PainterCtx::new(&mut self.data);