mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-18 02:16:23 -05:00
ds1: push/insert now sets new layer's size to current layer size
This commit is contained in:
parent
2cfacf8ee5
commit
198a28505e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user