sort of bandaid patch over resizing
This commit is contained in:
@@ -142,7 +142,10 @@ impl<'a> PainterCtx<'a> {
|
||||
// so swapping is impossible rn I think?
|
||||
// there's definitely better solutions like a counter (>1 = panic) but don't care rn
|
||||
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 resize = None;
|
||||
|
||||
@@ -125,11 +125,12 @@ impl Ui {
|
||||
}
|
||||
|
||||
fn redraw_size(&mut self) {
|
||||
let mut ctx = PainterCtx::new(&mut self.data);
|
||||
let dep = ctx.px_dependent.clone();
|
||||
for id in dep {
|
||||
ctx.redraw(id);
|
||||
}
|
||||
// let mut ctx = PainterCtx::new(&mut self.data);
|
||||
// let dep = ctx.px_dependent.clone();
|
||||
// for id in dep {
|
||||
// ctx.redraw(id);
|
||||
// }
|
||||
self.redraw_all();
|
||||
}
|
||||
|
||||
fn redraw_updates(&mut self) {
|
||||
|
||||
Reference in New Issue
Block a user