ImageEnView1.LayersRemove(LYR_SELECTED_LAYERS) sometimes (randomly) removes the BACKGROUND IMAGE together with the selected layer(s).
How can I avoid this?
I now use this workaround to remove the selected layer(s) without removing the background image:
for var i := ImageEnView1.LayersCount - 1 downto 1 do
begin
if ImageEnView1.Layers[i].Selected then
ImageEnView1.LayersRemove(i);
end;
This works. But isn't there a built-in method to achieve this?