Khaligufzel / Dimensionfall

A survival game inspired by Cataclysm: Dark Days Ahead and Bright Nights.
GNU General Public License v3.0
15 stars 7 forks source link

No sprite shows up in the map list after clicking "create minitiature image" in the map editor #396

Closed snipercup closed 1 month ago

snipercup commented 2 months ago

After clicking the "create miniature image" button in the map editor, I expect the image to show up in the content list where all the maps are listed, but this is not the case. It only shows up after restarting the game.

Steps to reproduce:

The image is saved here: https://github.com/Khaligufzel/Dimensionfall/blob/9c0979c66516e9da1532aad1af774d9c62f7ceae/Scenes/ContentManager/Mapeditor/Scripts/GridContainer.gd#L623-L638

and the mapEditor.currentMap.sprite is set, but the contentlist that lists the map is not updated.

We may need to call mapEditor.currentMap.data_changed(oldmap) in order to signal to the content list that a change was made.