Undo system

Sven Langkamp sven.langkamp at gmail.com
Thu Mar 8 18:21:08 CET 2007


Hi,

I have been working on the undo system and there are some issues that
I would like to discuss:

- Currently most of the commands are inside an anonymous namespace, so
that you can only create commands in the class they belong to. With
the new undo system the classes don't have access to the undoadapter
anymore and need to be added to the undo stack outside of it.

There are two ways:  Either add methods to KisImage etc. which create
every command or seperate the commands from the main class.

I prefer the second way as is more flexible. On the other hand it
would be needed to expose more of the internals.


- At the moment the commands in KisImage work recursive, which should
be avoided. It's not clear who is responsible for the locking of the
image. There are cases where the image is locked and unlocked three
times.

I think the locking of the image should be done by the command only.


- There isn't a KisCommandHistoryListener at the moment, but it's
needed for the transform tools. My idea was that KisDoc2 could
override the addCommand function, but would make the transform tool
Krita only.

Comments?


Sven


More information about the kimageshop mailing list