Spade-Editor / Spade

Cross-platform raster graphics editor inspired by Paint.NET
GNU General Public License v3.0
41 stars 10 forks source link

Global history instead of per-layer. #39

Closed HeroesGrave closed 10 years ago

HeroesGrave commented 10 years ago

To avoid everything being a mess, I've decided to scrap the idea of one history per layer.

It will just end up being to confusing anyway.

Longor1996 commented 10 years ago

That is a VERY good Idea! Don't forget to think about on the 'save history on harddrive to make it infinite'-thing.

Be aware that you need to add the layer-path to the history entries, so reverting a change affects the correct layer while reverting things!

HeroesGrave commented 10 years ago

I did a very lazy solution that simply wraps the current system.

It listens to all the changes happening, and stores a reference to them along with the canvas involved. When reverting/repeating changes it just pops one off the stack, calls revert/repeat on that canvas, and pushes it onto the other stack.