1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-09-29 22:56:07 -04:00

ds1: push/insert now sets new layer's size to current layer size

This commit is contained in:
M. Sz 2021-03-31 13:52:31 +02:00
parent 2cfacf8ee5
commit 198a28505e

View File

@ -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