Merge pull request #5862 from storytold/fix/canvas-tests-render-on-this-thread

Tests: two canvas tests render on their own thread
This commit is contained in:
BFlat
2026-11-06 09:22:07 +08:00
committed by GitHub
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -2879,6 +2879,7 @@ fn pixel_grid_shows_in_pixel_preview_from_600_percent() {
#[test]
fn grid_and_guides_take_their_preferences() {
let mut app = VectorcraftApp::new(Session::new(), Default::default());
app.canvas.worker_started = true; // render on this thread
app.session.execute("file.new", &json!({"width": 400, "height": 300})).unwrap();
app.session.execute("guide.add", &json!({"vertical": true, "pos": 100})).unwrap();
app.ui.view.grid = true;
+1
View File
@@ -195,6 +195,7 @@ mod tests {
#[test]
fn the_app_uploads_everything_again_in_a_new_context() {
let mut app = app();
app.canvas.worker_started = true; // render on this thread
let old = egui::Context::default();
// Fonts, then the canvas.
for _ in 0..3 {