Spain
Joined: May 9, 2012
Post Count: 154
Status:
Offline
BUG: Persistent background image on file after deletion
First of all, sorry to post here, but I wanted to attach a file larger than the maximum allowed by the bug tracker. Although now I'm writing here I cannot see controls to upload a file at all.
I cannot reproduce it using a new SH3D project but I had the problem with the project I'm working on with SH3D 3.5 installed on Windows 7.
I have a copy of the file (I'll try to upload some how) on which I deleted all the content except the background image. It takes about 1.7M, since it's the size of the background image.
If you load that file, delete the background and then save the file again, the size of the file is still 1.7M. More than that, if you then add another background image and save the size of the file will be 1.7M plus the new background size.
---------------------------------------- If a long walk every day were healthy, mailmen would be immortal.
Netherlands
Joined: Sep 26, 2009
Post Count: 3991
Status:
Offline
Re: BUG: Persistent background image on file after deletion
Angel, Emmanuel,
I downloaded your file, and opened it on my computer (Ubuntu 12.04 with SH3D 3.5).
1 - The file opens, but the screen does strange things: it seems as if the program opens on a screen that is much bigger than my screen: at first I thought I was looking at a screen shot. In the top left corner there is a small window with SH3D, about 3x smaller than usual. Sub-windows (like Preferences) open in normal size and are accessible. I deleted the background image and saved the empty file again. It has the same size as before. I then closed that window.
2 - I extracted your image from the SH3D file, and saved it as a JPG. I then opened SH3D again and imported that JPG as a background image. I then saved the file, deleted the background image and saved it again. The file with image is 1.8 Mb, the file without image is 5.7 Kb. Both files now open in normal windows, and seem to behave normally.
If you need further testing, please let me know. I attach the new file with image.
Spain
Joined: May 9, 2012
Post Count: 154
Status:
Offline
Re: BUG: Persistent background image on file after deletion
Thanks for your testing Hans.
So if I understand well you had to import the same background image (extracted from the zip SH3D container)over the supposedly deleted background image and then the second deletion is correctly made, right?
A weird thing... in addition I don't see the window size problem that you saw. on my PC all is normal except for the background image remain inside the SH3D file after being "deleted".
Regards.
---------------------------------------- If a long walk every day were healthy, mailmen would be immortal.
Spain
Joined: May 9, 2012
Post Count: 154
Status:
Offline
Re: BUG: Persistent background image on file after deletion
No way...
I deleted the background on my file and saved (size 1.7M). I extracted "0" and renamed it to "0.jpg", then imported it as background and saved (size 3.5M). Finally I deleted the background again and saved (size 1.7 again). :(
Anything different of what you did, Hans?
---------------------------------------- If a long walk every day were healthy, mailmen would be immortal.
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: BUG: Persistent background image on file after deletion
Guys don't look further, I perfectly know why it behaves like this, because it's the way I programmed it. The remaining background image is bound to the default level that exists in Sweet Home 3D before you add a first level, and as soon as you create a level this image can't be removed.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Spain
Joined: May 9, 2012
Post Count: 154
Status:
Offline
Re: BUG: Persistent background image on file after deletion
Oh, I see. Mystery solved then.
Certainly I created additional levels which I removed when I deleted all the content, leaving only the first level with the background image.
I hope it can be fixed easily. It's not a big problem, but it's more annoying when the imported background image has a large size, like the one I used.
Puybaret, if for some reason the fixing implies many or complex changes, I guess at least you could make a simple substitution of the actual image file for a dummy image file (0 bytes or 1x1 pixels), that way the wasted space is released.
Thanks and regards.
---------------------------------------- If a long walk every day were healthy, mailmen would be immortal.