diff --git a/d2common/d2fileformats/d2ds1/ds1_layers.go b/d2common/d2fileformats/d2ds1/ds1_layers.go index 0a8b7aab..65636c95 100644 --- a/d2common/d2fileformats/d2ds1/ds1_layers.go +++ b/d2common/d2fileformats/d2ds1/ds1_layers.go @@ -126,6 +126,7 @@ func (l *ds1Layers) SetHeight(h int) { func (l *ds1Layers) push(t layerGroupType, layer *Layer) { l.ensureInit() l.cull() + layer.SetSize(l.Size()) group := l.getLayersGroup(t) @@ -184,6 +185,8 @@ func (l *ds1Layers) insert(t layerGroupType, idx int, newLayer *Layer) { return } + newLayer.SetSize(l.Size()) + group := l.getLayersGroup(t) if group == nil { return