Fix naive merging logic in layer::Stack
This commit is contained in:
parent
d3e9547079
commit
c639c185d3
3 changed files with 46 additions and 7 deletions
|
|
@ -303,7 +303,23 @@ impl graphics::Layer for Layer {
|
|||
self.images.clear();
|
||||
}
|
||||
|
||||
fn level(&self) -> usize {
|
||||
fn start(&self) -> usize {
|
||||
if !self.quads.is_empty() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if !self.primitives.is_empty() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if !self.images.is_empty() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
fn end(&self) -> usize {
|
||||
if !self.text.is_empty() {
|
||||
return 3;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue