Browse Source
Merge pull request #2748 from MarchingCube/fix-renderlayers-clear
Fix RenderLayers.Clear not clearing inner collection
pull/2751/head
Nikita Tsukanov
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
2 deletions
-
src/Avalonia.Visuals/Rendering/RenderLayers.cs
|
|
|
@ -8,8 +8,8 @@ namespace Avalonia.Rendering |
|
|
|
{ |
|
|
|
public class RenderLayers : IEnumerable<RenderLayer> |
|
|
|
{ |
|
|
|
private List<RenderLayer> _inner = new List<RenderLayer>(); |
|
|
|
private Dictionary<IVisual, RenderLayer> _index = new Dictionary<IVisual, RenderLayer>(); |
|
|
|
private readonly List<RenderLayer> _inner = new List<RenderLayer>(); |
|
|
|
private readonly Dictionary<IVisual, RenderLayer> _index = new Dictionary<IVisual, RenderLayer>(); |
|
|
|
|
|
|
|
public int Count => _inner.Count; |
|
|
|
public RenderLayer this[IVisual layerRoot] => _index[layerRoot]; |
|
|
|
@ -56,6 +56,7 @@ namespace Avalonia.Rendering |
|
|
|
} |
|
|
|
|
|
|
|
_index.Clear(); |
|
|
|
_inner.Clear(); |
|
|
|
} |
|
|
|
|
|
|
|
public bool TryGetValue(IVisual layerRoot, out RenderLayer value) |
|
|
|
|