V1.4 wipes ui_events.cpp at each export

What do you want to achieve?

Amend my ui_events.cpp and not loose its content !

What have you tried so far?

Worked with v1.34, now resets the file

Screenshot or video

Others

  • SquareLine Studio version: 1.4
  • Operating system:
  • Target hardware:

If you select ‘Export UI Files’ from the menu it doesn’t wipe/overwrite your functions in ui_events.cpp, just tried it. You probably pressed ‘Create Template Project’ instead, that really wipes/overwrites the whole file.

1 Like

Thank you for your reply. However I was pretty sure I was using the “Export UI” option when this happens.
I double-checked and here is a screen capture of the behaviour:

https://www.dropbox.com/scl/fi/5rlju5gpnjb6xyo5li9u3/20240304-SLS-export-events.mov?rlkey=cr9an14a0xnt7ii1x3y9apd96&dl=0

I can confirm my ui_events.cpp file is reset when exporting with “Export UI”. Any idea or details to troubleshoot this ?

Bruno

Thanks for the video, I’ll forward this to the respective staff. I see in the video that you have an ‘src’ folder. Which board-template are you using for exporting? Is flat export enabled? They shouldn’t have impact on this behaviour but this can be a starting point to check the main differences between my correct exports and your problematic export first, to help find the scenario that causes this.

Flat export is checked, and the board is a SC01
image
Anything else I can provide to help diagnose the problem ?

Maybe where this SC01_PLUS2 board is coming from, so we could test with the same board-template.

Here is the board definition used in this project:

The behaviour where ui_events.cpp is reset at each export is a big pain as I can’t easily upload a fully working firmware when working on this project.

Thanks for the board-file. I could reproduce the issue even with other board-templates now, but it seems to happen only with flat-export turned on. Can you counter-test by unchecking the flat export and telling if it has any effect on the overwrite-behaviour at your side? Meanwhile I reported the issue to the responsive team.

Hi, I can confirm that disabling “flat export” preserves ui_events.cpp when exporting. This does look like a bug, then :slight_smile:
Thanks for the investigation, I have a decent workaround now, switching “flat export” off, which I don’t really need in fact.

1 Like