[Bug] Export All Mockups to PNG won't replace existing images


#1

Just made the jump to version 3, and noted an issue. When I try to export all of my mockups as PNG images to a directory where I had previous versions saved, it prompts whether to replace them or save both. That’s good, but when I choose to replace, it actually creates new images with a “_2” appended to the end. For now, I think the workaround will be to export to an empty folder and then manually copy the files over and replace the originals.

Note: this was done on a Mac running Mavericks using Balsamiq 3.1.2


Replacing Existing PNGs isn't working 100%
#2

I am seeing the same problem on Windows 7. For the fun of it I took a look at the actionscripts. It looks like changes to the ExportProjectAllPNGOperation.as were made in 3.1.2. I believe the problem is with balsamiq_mockups_3.1.2.swf in,

Action/com/balsamiq/mockups/controller/project/ExportProjectAllPNGOperation.as

On lines 103, 116, and 128 the IF statements have the conditions with an OR || operator and I believe they should have an AND && operator. With an OR operator the _urlToExport will always be set the ret.url which is the next available filename such as _2 or _3. That will cause even the replace operations to rename the filenames instead of replacing the existing ones.

ReplaceOperationConstants.SELECTION_KEEPBOTH || this._urlToExport != ret.url

Should be,

ReplaceOperationConstants.SELECTION_KEEPBOTH && this._urlToExport != ret.url

Hope this helps,
Jarin


#3

Thank you for your report, I confirm it is a bug we introduced on Balsamiq 3.1.2 and it will be fixed.

Andrea


#4

Hi everybody,

The new version 3.1.3 has the bugfix.
You can get the latest version here:
https://balsamiq.com/download/

Here are the complete release notes:
http://blogs.balsamiq.com/product/2015/06/23/newcalendar/