ID 467359 - Undo Layer Merge without corresponding object selected destroys texture data

Follow

Problem summary
Undo Layer Merge without corresponding object selected destroys texture data
Selecting one of the unmerged layers crashes Mari

Customer reported version
Mari 4.6v4

Customer reported platform
Windows 10

Steps to reproduce

1) Open an Example Project (Help > Create Example Project)

2) In the Layers Palette, create a new layer above the 'Diffuse_Colour' layer

3) Select both the new layer and the 'Diffuse_Colour' layer, right click and select 'Merge Layers'

4) In the Objects Palette, select the 'Eyeballs' object

5) Undo by pressing CTRL-Z or clicking the undo button on the toolbar

6) Reselect the 'Head_Geo' object and then select one of the unmerged layers

Expected behaviour
Undoing a layer merge produces the two layers originally merged regardless of object selection.

Actual behaviour
Undoing a layer merge deletes all texture data in the merged layer unless the object that this layer belongs to is currently selected. Selecting one of the unmerged layers crashes Mari.

Workaround
Unknown.

Reproduced by support
This bug has been reproduced in:
Mari 4.7v2 - Windows 10 - CentOS 7.5
Mari 4.7v1 - Windows 10
Mari 4.6v4 - Windows 10 - CentOS 7.5 - regression

Unable to reproduce bug in: 

Mari 4.6v3 - Windows 10 - CentOS 7.5

Earliest version tested
Mari 4.6v3 - This issue doesn't appear in this version and has regressed

    We're sorry to hear that

    Please tell us why