🐛 Fix rulers shown on thumbnails

This commit is contained in:
Elena Torró 2026-06-19 13:01:26 +02:00 committed by GitHub
parent b9ebe9f4ee
commit b91eece5bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -890,7 +890,9 @@ impl RenderState {
if self.options.is_debug_visible() {
debug::render(self);
}
ui::render(self, tree);
if !self.preview_mode {
ui::render(self, tree);
}
debug::render_wasm_label(self);
self.surfaces.flush_and_submit(SurfaceId::Target);
}
@ -2192,8 +2194,11 @@ impl RenderState {
self.interactive_target_seeded = false;
// Paint rulers/frame now so they survive the progressive frames
// instead of blanking until the first full `present_frame`.
ui::render(self, tree);
self.flush_and_submit();
// Skip on sync renders (thumbnails/exports)
if !sync_render {
ui::render(self, tree);
self.flush_and_submit();
}
}
let surface_ids = SurfaceId::Strokes as u32