Return 0 in Layer::start for empty layers

This commit is contained in:
Héctor Ramón Jiménez 2025-08-17 00:07:58 +02:00
parent c639c185d3
commit 46167c78c7
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 10 additions and 2 deletions

View file

@ -316,9 +316,13 @@ impl graphics::Layer for Layer {
return 2; return 2;
} }
if !self.text.is_empty() {
return 3; return 3;
} }
0
}
fn end(&self) -> usize { fn end(&self) -> usize {
if !self.text.is_empty() { if !self.text.is_empty() {
return 3; return 3;

View file

@ -310,7 +310,11 @@ impl graphics::Layer for Layer {
return 3; return 3;
} }
4 if !self.text.is_empty() {
return 4;
}
0
} }
fn end(&self) -> usize { fn end(&self) -> usize {