mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
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:
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))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user