I’m not sure I understand the reasoning for AS IDE to delete an image from the hard drive when a control is deleted. And I understand even less why it is deleted when I cut the control (as usually a cut is succeeded by a paste).
The real problem comes in when you do paste the image back, as the src still points to the deleted file (and hopefully you kept a copy of it elsewhere as it’s not recycled either).
I tried it again this morning without error at first. But now I know the key that causes the src file to delete. Here’s the process. I’m using a BS4 image, but I’m sure it happens with common control images as well.
Create a new javascript project
On the default form add a BS4 image control
save the project.
add a common controls container to the form
cut the image control from the form
save the project
go to your image folder and notice the image file has been deleted. However, the CUT image control still points to that file.
paste the control back onto the form.
you’ll get the error about the bad source.
paste the control into the container.
no error about the bad src.
It’s the project save that is deleting the files. And why I missed it for so long is that it was the save on deploy that was getting me. I cut an image, started on desktop browser, then pasted the image back.