sort of bandaid patch over resizing

This commit is contained in:
2025-11-11 14:45:06 -05:00
parent afabdc52a2
commit 8755c04feb
2 changed files with 10 additions and 6 deletions

View File

@@ -142,7 +142,10 @@ impl<'a> PainterCtx<'a> {
// so swapping is impossible rn I think? // so swapping is impossible rn I think?
// there's definitely better solutions like a counter (>1 = panic) but don't care rn // there's definitely better solutions like a counter (>1 = panic) but don't care rn
if self.draw_started.contains(&id) { if self.draw_started.contains(&id) {
panic!("Cannot draw the same widget twice (1)"); panic!(
"Cannot draw the same widget ({}) twice (1)",
self.widgets.data(&id).unwrap().label
);
} }
let mut old_children = old_children.unwrap_or_default(); let mut old_children = old_children.unwrap_or_default();
let mut resize = None; let mut resize = None;

View File

@@ -125,11 +125,12 @@ impl Ui {
} }
fn redraw_size(&mut self) { fn redraw_size(&mut self) {
let mut ctx = PainterCtx::new(&mut self.data); // let mut ctx = PainterCtx::new(&mut self.data);
let dep = ctx.px_dependent.clone(); // let dep = ctx.px_dependent.clone();
for id in dep { // for id in dep {
ctx.redraw(id); // ctx.redraw(id);
} // }
self.redraw_all();
} }
fn redraw_updates(&mut self) { fn redraw_updates(&mut self) {