Fix-up #11077 (review): say that pixels past the canvas count for Empty

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
David MannandClaude Opus 5.5 committed 2026-11-04 17:32:59 +01:00
1 parent 533cf55ef5
commit c144e36d9c
1 file changed
+3 -1
@@ -140,7 +140,9 @@ impl Attribute {
}
}
/// Whether `l` is a pixel layer with no visible pixels on `canvas`; an empty group isn't listed.
/// Whether `l` is a pixel layer with no visible pixels; an empty group isn't listed. Stored pixels
/// past the canvas count (they are the layer's, Reveal All brings them back); `canvas` only bounds
/// the check for a layer whose default pixel is opaque (see [`has_visible_pixels`]).
fn is_empty(l: &Layer, canvas: Option<Rect>) -> bool {
matches!(&l.content, LayerContent::Raster(s) if !has_visible_pixels(s, canvas))
}