Ogmo-Editor-3 / OgmoEditor3-CE

The Community Edition of Ogmo Editor 3
https://ogmo-editor-3.github.io
MIT License
502 stars 48 forks source link

Change default lastPaletteHeight to a larger number than 0. #227

Open mooreorless555 opened 6 months ago

mooreorless555 commented 6 months ago

This is for that case where you click "Edit Project", do some stuff, then click "Save & Update", and you can't "see" the entity/decal palette anymore. From my experimenting, I think it turns out that lastPaletteHeight was setting the editor palette height to 0.

This doesn't root-cause the issue as to why lastPaletteHeight remains 0 on refresh, but it does fix the entity panel becoming hidden when you save and update your project.

hubol commented 4 months ago

An alternative way to fix might be to only set the element's height when lastPaletteHeight > 0

https://github.com/Ogmo-Editor-3/OgmoEditor3-CE/blob/b2a52159ebbf7b8a43b8a42243b7a96d3af847f7/src/level/editor/Editor.hx#L471