Return 0 in Layer::start for empty layers
This commit is contained in:
parent
c639c185d3
commit
46167c78c7
2 changed files with 10 additions and 2 deletions
|
|
@ -316,7 +316,11 @@ impl graphics::Layer for Layer {
|
|||
return 2;
|
||||
}
|
||||
|
||||
return 3;
|
||||
if !self.text.is_empty() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
0
|
||||
}
|
||||
|
||||
fn end(&self) -> usize {
|
||||
|
|
|
|||
|
|
@ -310,7 +310,11 @@ impl graphics::Layer for Layer {
|
|||
return 3;
|
||||
}
|
||||
|
||||
4
|
||||
if !self.text.is_empty() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
0
|
||||
}
|
||||
|
||||
fn end(&self) -> usize {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue