Undoing map bg image set should display previous bg image if any
Now it just goes blank:
https://user-images.githubusercontent.com/38327916/203585461-af81f98c-29c9-4c89-8b78-464d8e2e7864.mov
This is caused by app.resetDocument() in app\features\map-planner\components\Planner.tsx.
Further investigating would be required to see if this function call is needed & re-evaluate from there. I have a few thoughts though (I haven't read the docs yet):
- If the function call is needed, we would have to manually save a snapshot of the canvas history before calling resetDocument()
- If the function call is not needed, then we should be able to simply remove it - but it's important to know exactly what this function does & why it was here in the first place
At this time, a good way to do this may be to remove the reset document call on the "Set background" button and implement a separate reset button instead. But the screen is already full of buttons, so UI-wise I don't know if that is desirable.
I do like the "Set background" button's current behaviour of actually clearing out the other stuff on the canvas though - so do we really still consider this a valid bug when it currently flows nicely UX-wise (IMO)?
Yeah I think it's still an issue because when you think what you expect "undo" to do then resetting to previous state is that. + you might accidentally blow away some important progress that currently can't be restored.