mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-01 18:54:31 +01:00
Private #8779 focused failure diagnostics; preserve all assertions
This commit is contained in:
1 parent
aa4c313baa
commit
dfaf4bedb8
1 file changed
+10
-1
@@ -5062,7 +5062,16 @@ fn review_8687_node(nodes: &[egui::accesskit::Node], name: &str, role: egui::acc
|
||||
|
||||
fn review_8687_click(app: &mut crate::VectorcraftApp, ctx: &egui::Context, width: f32, node: &egui::accesskit::Node) {
|
||||
let b = node.bounds().expect("an actual visible control");
|
||||
assert!(b.x0 >= 0.0 && b.x1 <= width as f64 && b.y0 >= 0.0 && b.y1 <= 300.0);
|
||||
assert!(
|
||||
b.x0 >= 0.0 && b.x1 <= width as f64 && b.y0 >= 0.0 && b.y1 <= 300.0,
|
||||
"target {:?} {:?}: bounds ({}, {}, {}, {}) outside viewport ({width}, 300)",
|
||||
node.role(),
|
||||
node.label(),
|
||||
b.x0,
|
||||
b.y0,
|
||||
b.x1,
|
||||
b.y1
|
||||
);
|
||||
let at = egui::pos2(((b.x0 + b.x1) / 2.0) as f32, ((b.y0 + b.y1) / 2.0) as f32);
|
||||
let button = |pressed| egui::Event::PointerButton { pos: at, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() };
|
||||
bar_frame(app, ctx, width, None, vec![egui::Event::PointerMoved(at), button(true)], super::status_bar);
|
||||
|
||||
Reference in new issue
Block a user